Skip to content

Commit

Permalink
pytest: fix bad gossip flake in test_closing_specified_destination.
Browse files Browse the repository at this point in the history
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Feb 7, 2024
1 parent 689e596 commit bbf6a89
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_closing.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,12 @@ def test_closing_specified_destination(node_factory, bitcoind, chainparams):
wait_for(lambda: len(n.rpc.listchannels()['channels']) == 6)
wait_for(lambda: ['alias' in node for node in n.rpc.listnodes()['nodes']] == [True] * 4)

# If we don't wait for gossip to propagate, then we can get bad gossip msgs if it
# propagates after close!
for n in l1, l2, l3, l4:
wait_for(lambda: len(n.rpc.listchannels()['channels']) == 6)
wait_for(lambda: ['alias' in node for node in n.rpc.listnodes()['nodes']] == [True] * 4)

addr = chainparams['example_addr']
l1.rpc.close(chan12, None, addr)
l1.rpc.call('close', {'id': chan13, 'destination': addr})
Expand Down

0 comments on commit bbf6a89

Please sign in to comment.