mirror of
https://github.com/aljazceru/plugins.git
synced 2025-12-26 01:14:20 +01:00
rebalance: fix flake8 code nits
This commit is contained in:
@@ -357,7 +357,7 @@ def rebalance(plugin, outgoing_scid, incoming_scid, msatoshi: Millisatoshi = Non
|
||||
"status": "complete",
|
||||
"message": f"{msatoshi + fees} sent over {len(route)} hops to rebalance {msatoshi}",
|
||||
}
|
||||
midroute_str = reduce(lambda x,y: x + " -> " + y, map(lambda r: get_node_alias(r['id']), route_mid))
|
||||
midroute_str = reduce(lambda x, y: x + " -> " + y, map(lambda r: get_node_alias(r['id']), route_mid))
|
||||
full_route_str = "%s -> %s -> %s -> %s" % (get_node_alias(my_node_id), get_node_alias(outgoing_node_id), midroute_str, get_node_alias(my_node_id))
|
||||
plugin.log(f"Thread{get_thread_id_str()} {len(route)} hops and {fees.to_satoshi_str()} fees for {msatoshi.to_satoshi_str()} along route: {full_route_str}")
|
||||
for r in route:
|
||||
|
||||
@@ -79,7 +79,7 @@ def test_rebalance_manual(node_factory, bitcoind):
|
||||
|
||||
# briefly check rebalancereport works
|
||||
report = l1.rpc.rebalancereport()
|
||||
assert report.get('rebalanceall_is_running') == False
|
||||
assert report.get('rebalanceall_is_running') is False
|
||||
assert report.get('total_successful_rebalances') == 2
|
||||
|
||||
|
||||
@@ -143,5 +143,5 @@ def test_rebalance_all(node_factory, bitcoind):
|
||||
|
||||
# briefly check rebalancereport works
|
||||
report = l1.rpc.rebalancereport()
|
||||
assert report.get('rebalanceall_is_running') == False
|
||||
assert report.get('rebalanceall_is_running') is False
|
||||
assert report.get('total_successful_rebalances') == 2
|
||||
|
||||
Reference in New Issue
Block a user