mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
pytest: write test to ensure renepay the correct channel's fee/cltv info.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
14e28a51ce
commit
0135d563a0
1 changed files with 15 additions and 0 deletions
|
@ -18,6 +18,21 @@ def test_simple(node_factory):
|
|||
assert details['destination'] == l2.info['id']
|
||||
|
||||
|
||||
@pytest.mark.xfail(strict=True)
|
||||
def test_direction_matters(node_factory):
|
||||
'''Make sure we use correct delay and fees for the direction we're going.'''
|
||||
l1, l2, l3 = node_factory.line_graph(3,
|
||||
wait_for_announce=True,
|
||||
opts=[{},
|
||||
{'fee-base': 2000, 'fee-per-satoshi': 20, 'cltv-delta': 20},
|
||||
{'fee-base': 3000, 'fee-per-satoshi': 30, 'cltv-delta': 30}])
|
||||
inv = l3.rpc.invoice(123000, 'test_renepay', 'description')['bolt11']
|
||||
details = l1.rpc.call('renepay', {'invstring': inv})
|
||||
assert details['status'] == 'complete'
|
||||
assert details['amount_msat'] == Millisatoshi(123000)
|
||||
assert details['destination'] == l3.info['id']
|
||||
|
||||
|
||||
def test_mpp(node_factory):
|
||||
'''Test paying a remote node using two routes.
|
||||
1----2----4
|
||||
|
|
Loading…
Add table
Reference in a new issue