mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
pytest: fix flake in test_closing_simple when we mine too fast.
We can actually catch l2 with HTLCs still closing and mine blocks, then it force closes due to HTLC timeout. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
f87c7ed439
commit
38510202c4
@ -46,6 +46,8 @@ def test_closing_simple(node_factory, bitcoind, chainparams):
|
||||
# check for the substring
|
||||
assert 'CHANNELD_NORMAL:Channel ready for use.' in billboard[0]
|
||||
|
||||
# Make sure all HTLCs resolved before we close!
|
||||
wait_for(lambda: only_one(l2.rpc.listpeerchannels()['channels'])['htlcs'] == [])
|
||||
l1.rpc.close(chan)
|
||||
|
||||
l1.daemon.wait_for_log(' to CHANNELD_SHUTTING_DOWN')
|
||||
|
Loading…
Reference in New Issue
Block a user