From b3fd47e5f64f1052b246b6a57936351cdeb36bb6 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Fri, 18 Dec 2020 10:42:00 +0100 Subject: [PATCH] pytest: Stabilize test_routing_gossip We were getting bad gossip because some nodes discarded the channel announcement for being in the future. This is because the node was, at that time, below the confirmation height. It'd then discard the followup messages because not preceded by an announcement, and getting upset about that. --- tests/test_gossip.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_gossip.py b/tests/test_gossip.py index b598a6d25..121f64198 100644 --- a/tests/test_gossip.py +++ b/tests/test_gossip.py @@ -510,6 +510,11 @@ def test_routing_gossip(node_factory, bitcoind): src.rpc.connect(dst.info['id'], 'localhost', dst.port) src.openchannel(dst, 25000) + # Avoid "bad gossip" caused by future announcements (a node below + # confirmation height receiving and ignoring the announcement, + # thus marking followup messages as bad). + sync_blockheight(bitcoind, nodes) + # Allow announce messages. bitcoind.generate_block(5)