mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-02 18:35:00 +01:00
pytest: fix flaky test_peerinfo
If we don't wait for close tx to reach mempool, it might not get to depth 100, and we don't get 'onchaind complete, forgetting peer'. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
4df9b2c5f2
commit
75496ad168
1 changed files with 2 additions and 1 deletions
|
@ -1596,7 +1596,8 @@ def test_peerinfo(node_factory, bitcoind):
|
|||
wait_for(lambda: not only_one(l1.rpc.listpeers(l2.info['id'])['peers'])['connected'])
|
||||
wait_for(lambda: not only_one(l2.rpc.listpeers(l1.info['id'])['peers'])['connected'])
|
||||
|
||||
bitcoind.generate_block(100)
|
||||
# Make sure close tx hits mempool before we mine blocks.
|
||||
bitcoind.generate_block(100, wait_for_mempool=1)
|
||||
l1.daemon.wait_for_log('onchaind complete, forgetting peer')
|
||||
l2.daemon.wait_for_log('onchaind complete, forgetting peer')
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue