Skip to content

Commit 2801d98

Browse files
rustyrussellniftynei
authored andcommitted
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 <[email protected]>
1 parent bc430cc commit 2801d98

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tests/test_pay.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,14 +1749,19 @@ def test_pay_direct(node_factory, bitcoind):
17491749
"""Check that we prefer the direct route.
17501750
"""
17511751
# l2->l3 is really cheap by comparison.
1752+
# Cross-connections mean we can get bad gossip, due to timing
17521753
l0, l1, l2, l3 = node_factory.get_nodes(4, opts=[{'fee-base': 1000,
1753-
'cltv-delta': 14},
1754+
'cltv-delta': 14,
1755+
'allow_bad_gossip': True},
17541756
{'fee-base': 1000,
1755-
'cltv-delta': 14},
1757+
'cltv-delta': 14,
1758+
'allow_bad_gossip': True},
17561759
{'fee-base': 0,
1757-
'cltv-delta': 14},
1760+
'cltv-delta': 14,
1761+
'allow_bad_gossip': True},
17581762
{'fee-base': 1000,
1759-
'cltv-delta': 14}])
1763+
'cltv-delta': 14,
1764+
'allow_bad_gossip': True}])
17601765

17611766
# Direct channel l0->l1->l3
17621767
l0.rpc.connect(l1.info['id'], 'localhost', l1.port)

0 commit comments

Comments
 (0)