rebalance: get_max_amount start with the original amount

The first amount to try is the original amount. After a fail, `rebalanceall` starts to divide it by 4.
This commit is contained in:
Gálli Zoltán
2021-11-16 12:59:50 +01:00
committed by Michael Schmoock
parent 20d7bbb212
commit 57edc6cd38

View File

@@ -448,7 +448,7 @@ def feeadjust_would_be_nice(plugin: Plugin):
def get_max_amount(i: int, plugin: Plugin):
return max(plugin.min_amount, plugin.enough_liquidity / (4**(i + 1)))
return max(plugin.min_amount, plugin.enough_liquidity / (4**i))
def get_max_fee(plugin: Plugin, msat: Millisatoshi):