From c5c24cb74a28c1d0c1aadd9c1a859e8c9569fb82 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Wed, 27 May 2020 15:29:09 +0200 Subject: [PATCH] jitrebalance: assert l2 jit-rebalanced in test_simple_rebalance Signed-off-by: Antoine Poinsot --- jitrebalance/test_jitrebalance.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jitrebalance/test_jitrebalance.py b/jitrebalance/test_jitrebalance.py index 57ffe70..cb8e765 100644 --- a/jitrebalance/test_jitrebalance.py +++ b/jitrebalance/test_jitrebalance.py @@ -74,9 +74,10 @@ def test_simple_rebalance(node_factory): route = l1.rpc.getroute(node_id=l4.info['id'], msatoshi=amt, riskfactor=1, exclude=[scid + '/0', scid + '/1'])['route'] - # This will fail without the plugin doing a rebalancing. + # This will succeed with l2 doing a rebalancing just-in-time ! l1.rpc.sendpay(route, inv['payment_hash']) - l1.rpc.waitsendpay(inv['payment_hash']) + assert l1.rpc.waitsendpay(inv['payment_hash'])['status'] == 'complete' + assert l2.daemon.is_in_log('Succesfully re-filled outgoing capacity') @unittest.skipIf(not DEVELOPER, "gossip is too slow if we're not in developer mode")