mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
pytest: fix race in test_closing_different_fees
We got an index error, because status had only one field (onchaind not started yet). > wait_for(lambda: only_one(p.rpc.listpeers(l1.info['id'])['peers'][0]['channels'])['status'][1] == 'ONCHAIN:Tracking mutual close transaction') E IndexError: list index out of range1 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
f8052a6c1a
commit
bc7ca34a38
@ -244,7 +244,8 @@ def test_closing_different_fees(node_factory, bitcoind, executor):
|
||||
bitcoind.generate_block(1)
|
||||
for p in peers:
|
||||
p.daemon.wait_for_log(' to ONCHAIN')
|
||||
wait_for(lambda: only_one(p.rpc.listpeers(l1.info['id'])['peers'][0]['channels'])['status'][1] == 'ONCHAIN:Tracking mutual close transaction')
|
||||
wait_for(lambda: 'ONCHAIN:Tracking mutual close transaction' in only_one(p.rpc.listpeers(l1.info['id'])['peers'][0]['channels'])['status'])
|
||||
|
||||
l1.daemon.wait_for_logs([' to ONCHAIN'] * num_peers)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user