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.
This commit is contained in:
Christian Decker
2020-12-18 10:42:00 +01:00
parent 1ff57f07f8
commit b3fd47e5f6

View File

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