Browse Source

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>
travis-debug
Rusty Russell 5 years ago
committed by neil saitug
parent
commit
2801d98e34
  1. 13
      tests/test_pay.py

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

Loading…
Cancel
Save