diff --git a/tests/test_renepay.py b/tests/test_renepay.py index 7029f213f..49a9477a9 100644 --- a/tests/test_renepay.py +++ b/tests/test_renepay.py @@ -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