From 2801d98e34827434f180c9b14f20778b245a10c5 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 15 Oct 2019 13:21:08 +1030 Subject: [PATCH] pytest: allow bad gossip in test_pay_direct. Whenever we have multi-connected nodes, out-of-order gossip is possible. In particular, if a node_announcement is 1 second fresher than the channel_announcement, a timestamp_filter might get one and not the other. Signed-off-by: Rusty Russell --- tests/test_pay.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/test_pay.py b/tests/test_pay.py index fe553d23a..5bdf0b03d 100644 --- a/tests/test_pay.py +++ b/tests/test_pay.py @@ -1749,14 +1749,19 @@ def test_pay_direct(node_factory, bitcoind): """Check that we prefer the direct route. """ # l2->l3 is really cheap by comparison. + # Cross-connections mean we can get bad gossip, due to timing l0, l1, l2, l3 = node_factory.get_nodes(4, opts=[{'fee-base': 1000, - 'cltv-delta': 14}, + 'cltv-delta': 14, + 'allow_bad_gossip': True}, {'fee-base': 1000, - 'cltv-delta': 14}, + 'cltv-delta': 14, + 'allow_bad_gossip': True}, {'fee-base': 0, - 'cltv-delta': 14}, + 'cltv-delta': 14, + 'allow_bad_gossip': True}, {'fee-base': 1000, - 'cltv-delta': 14}]) + 'cltv-delta': 14, + 'allow_bad_gossip': True}]) # Direct channel l0->l1->l3 l0.rpc.connect(l1.info['id'], 'localhost', l1.port)