mirror of
https://github.com/lightningd/plugins.git
synced 2026-08-16 13:00:58 +02:00
fix: workaround for outdated pylightning versions #2601
This commit is contained in:
parent
e7adbfa161
commit
799eb51528
1 changed files with 2 additions and 1 deletions
|
|
@ -154,7 +154,8 @@ def rebalance(plugin, outgoing_scid, incoming_scid, msatoshi: Millisatoshi=None,
|
|||
route = [route_out] + route_mid + [route_in]
|
||||
setup_routing_fees(plugin, route, msatoshi)
|
||||
fees = route[0]['msatoshi'] - route[-1]['msatoshi']
|
||||
if fees > exemptfee and fees > msatoshi * float(maxfeepercent) / 100:
|
||||
# NOTE: the int(msat) casts are just a workaround for outdated pylightning versions
|
||||
if fees > exemptfee and int(fees) > int(msatoshi) * float(maxfeepercent) / 100:
|
||||
worst_channel_id = find_worst_channel(route)
|
||||
if worst_channel_id is None:
|
||||
raise RpcError("rebalance", payload, {'message': 'Insufficient fee'})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue