From 57edc6cd3854341115504c522fd4917e1bd9e66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1lli=20Zolt=C3=A1n?= Date: Tue, 16 Nov 2021 12:59:50 +0100 Subject: [PATCH] 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. --- rebalance/rebalance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebalance/rebalance.py b/rebalance/rebalance.py index 918c6a7..f6ab34b 100755 --- a/rebalance/rebalance.py +++ b/rebalance/rebalance.py @@ -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):