Browse Source

pytest: make test_gossip_notices_close more reliable.

It's possible that it hasn't got the node_announcement messages;
it will still list the nodes, however (the channel_announcement tells
it the nodes exist).  Check for the alias field instead.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
htlc_accepted_hook
Rusty Russell 6 years ago
committed by neil saitug
parent
commit
1147e65602
  1. 4
      tests/test_gossip.py

4
tests/test_gossip.py

@ -944,9 +944,9 @@ def test_gossip_notices_close(node_factory, bitcoind):
bitcoind.generate_block(5)
# Make sure l1 learns about channel.
# Make sure l1 learns about channel and nodes.
wait_for(lambda: len(l1.rpc.listchannels()['channels']) == 2)
wait_for(lambda: len(l1.rpc.listnodes()['nodes']) == 2)
wait_for(lambda: ['alias' in n for n in l1.rpc.listnodes()['nodes']] == [True, True])
l1.rpc.disconnect(l2.info['id'])
# Grab channel_announcement from io logs (ends in ')

Loading…
Cancel
Save