MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_direction_matters

Function test_direction_matters

tests/test_renepay.py:30–45  ·  view source on GitHub ↗

Make sure we use correct delay and fees for the direction we're going.

(node_factory)

Source from the content-addressed store, hash-verified

28
29
30def test_direction_matters(node_factory):
31 """Make sure we use correct delay and fees for the direction we're going."""
32 l1, l2, l3 = node_factory.line_graph(
33 3,
34 wait_for_announce=True,
35 opts=[
36 {'allow-deprecated-apis': True},
37 {"fee-base": 2000, "fee-per-satoshi": 20, "cltv-delta": 20},
38 {"fee-base": 3000, "fee-per-satoshi": 30, "cltv-delta": 30},
39 ],
40 )
41 inv = l3.rpc.invoice(123000, "test_renepay", "description")["bolt11"]
42 details = l1.rpc.call("renepay", {"invstring": inv})
43 assert details["status"] == "complete"
44 assert details["amount_msat"] == Millisatoshi(123000)
45 assert details["destination"] == l3.info["id"]
46
47
48def test_shadow_routing(node_factory):

Callers

nothing calls this directly

Calls 4

MillisatoshiClass · 0.90
line_graphMethod · 0.80
invoiceMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected