From 94c641ea58485b0c4dc264a8ff37a48a11b8553a Mon Sep 17 00:00:00 2001 From: darosior Date: Wed, 4 Sep 2019 15:14:29 +0200 Subject: [PATCH] rebalance: restore Python3.5 compat Support old snakes that have not shed yet --- rebalance/rebalance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebalance/rebalance.py b/rebalance/rebalance.py index cd146af..f9989be 100755 --- a/rebalance/rebalance.py +++ b/rebalance/rebalance.py @@ -16,7 +16,7 @@ def setup_routing_fees(plugin, route, msatoshi): ch = next(c for c in channels.get('channels') if c['destination'] == r['id']) fee = Millisatoshi(ch['base_fee_millisatoshi']) # BOLT #7 requires fee >= fee_base_msat + ( amount_to_forward * fee_proportional_millionths / 1000000 ) - fee += (msatoshi * ch['fee_per_millionth'] + 999_999) // 1_000_000 # integer math trick to round up + fee += (msatoshi * ch['fee_per_millionth'] + 10**6 - 1) // 10**6 # integer math trick to round up msatoshi += fee delay += ch['delay']