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>
This commit is contained in:
Rusty Russell
2019-05-29 06:41:30 +09:30
committed by neil saitug
parent a40fe40ad2
commit 1147e65602

View File

@@ -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 ')