Browse Source

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.
ppa
Christian Decker 4 years ago
parent
commit
b3fd47e5f6
  1. 5
      tests/test_gossip.py

5
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.rpc.connect(dst.info['id'], 'localhost', dst.port)
src.openchannel(dst, 25000) 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. # Allow announce messages.
bitcoind.generate_block(5) bitcoind.generate_block(5)

Loading…
Cancel
Save