mirror of
https://github.com/aljazceru/plugins.git
synced 2026-01-04 22:04:20 +01:00
rebalance: fix issue 29
I think this issue happens on older version of pylightning only.
This commit is contained in:
committed by
Christian Decker
parent
ec3037388c
commit
89c95e4fe8
@@ -85,8 +85,8 @@ def calc_optimal_amount(out_ours, out_total, in_ours, in_total, payload):
|
||||
in_ours, in_total = int(in_ours), int(in_total)
|
||||
|
||||
in_theirs = in_total - in_ours
|
||||
vo = out_ours - (out_total/2)
|
||||
vi = (in_total/2) - in_ours
|
||||
vo = int(out_ours - (out_total/2))
|
||||
vi = int((in_total/2) - in_ours)
|
||||
|
||||
# cases where one option can be eliminated because it exceeds other capacity
|
||||
if vo > in_theirs and vi > 0 and vi < out_ours:
|
||||
|
||||
Reference in New Issue
Block a user