Skip to content

Commit 0bc80c4

Browse files
rustyrussellcdecker
authored andcommitted
pytest: make sure we wait for node announcements in line_graph too.
Occasional failure in test_fulfill_incoming_first where the channel closed before the final message from dev_disonnect was read. Cause was the peer writing a gossip msg and failing due to ECONNRESET, before it read the final message. (Managed to reproduce under strace -f, FTW). This is really a symptom of the fact that line_graph's announce=True didn't wait for node announcements. Let's do that. Signed-off-by: Rusty Russell <[email protected]>
1 parent ae4f358 commit 0bc80c4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,11 @@ def both_dirs_ready(n, scid):
833833
wait_for(lambda: both_dirs_ready(nodes[0], scids[-1]))
834834
wait_for(lambda: both_dirs_ready(nodes[-1], scids[0]))
835835

836+
# Make sure we have all node announcements, too (just check ends)
837+
for n in nodes:
838+
for end in (nodes[0], nodes[-1]):
839+
wait_for(lambda: 'alias' in only_one(end.rpc.listnodes(n.info['id'])['nodes']))
840+
836841
return nodes
837842

838843
def killall(self, expected_successes):

0 commit comments

Comments
 (0)