Skip to content

Commit 3a0a02c

Browse files
committed
pytest: fix case where test can do unilateral close
And we timeout in: l2.wait_for_channel_onchain(l1.info['id']) Because the unilateral wins. This is because we tell closingd to negotiate with a min feerate of 3750, but when it does and we check it, our min has jumped, lightningd rejects it: ... That's below our min XXX for weight 772 at feerate 7000 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 01a8d2b commit 3a0a02c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_connection.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2626,7 +2626,9 @@ def test_update_fee_reconnect(node_factory, bitcoind):
26262626
assert l1.daemon.is_in_log('got commitsig [0-9]*: feerate 14005')
26272627
assert l2.daemon.is_in_log('got commitsig [0-9]*: feerate 14005')
26282628

2629-
# Now shutdown cleanly.
2629+
# Now shutdown cleanly. (Make sure l1 has raised min_acceptable: if it
2630+
# changes while it negotiates, it may reject the result and unilaterally close!)
2631+
wait_for(lambda: l1.rpc.feerates(style='perkw')['perkw']['min_acceptable'] == 7000)
26302632
l1.rpc.close(chan)
26312633

26322634
# And should put closing into mempool.

0 commit comments

Comments
 (0)