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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-10-15 13:21:08 +10:30
committed by neil saitug
parent bc430cced3
commit 2801d98e34

View File

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