mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
pytest: Fix up the payload replacement test
There is a race between `getroute` learning that our peer accepts TLVs and us initiating the payment. Waiting for announcements ensures we always use TLVs, matching our expectation in the test / plugin.
This commit is contained in:
parent
957a3a01b9
commit
b5c9dcab5a
@ -1255,7 +1255,11 @@ def test_feature_set(node_factory):
|
||||
def test_replacement_payload(node_factory):
|
||||
"""Test that htlc_accepted plugin hook can replace payload"""
|
||||
plugin = os.path.join(os.path.dirname(__file__), 'plugins/replace_payload.py')
|
||||
l1, l2 = node_factory.line_graph(2, opts=[{}, {"plugin": plugin}])
|
||||
l1, l2 = node_factory.line_graph(
|
||||
2,
|
||||
opts=[{}, {"plugin": plugin}],
|
||||
wait_for_announce=True
|
||||
)
|
||||
|
||||
# Replace with an invalid payload.
|
||||
l2.rpc.call('setpayload', ['0000'])
|
||||
|
Loading…
Reference in New Issue
Block a user