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

Function test_mpp

tests/test_renepay.py:73–96  ·  view source on GitHub ↗

Test paying a remote node using two routes. 1----2----4 | | 3----5----6 Try paying 1.2M sats from 1 to 6.

(node_factory)

Source from the content-addressed store, hash-verified

71
72
73def test_mpp(node_factory):
74 """Test paying a remote node using two routes.
75 1----2----4
76 | |
77 3----5----6
78 Try paying 1.2M sats from 1 to 6.
79 """
80 opts = [
81 {"disable-mpp": None, "fee-base": 0, "fee-per-satoshi": 0, 'dev-allow-localhost': None, 'allow-deprecated-apis': True},
82 ]
83 l1, l2, l3, l4, l5, l6 = node_factory.get_nodes(6, opts=opts * 6)
84 node_factory.join_nodes(
85 [l1, l2, l4, l6], wait_for_announce=True, fundamount=1000000
86 )
87 node_factory.join_nodes(
88 [l1, l3, l5, l6], wait_for_announce=True, fundamount=1000000
89 )
90
91 send_amount = Millisatoshi("1200000sat")
92 inv = l6.rpc.invoice(send_amount, "test_renepay", "description")["bolt11"]
93 details = l1.rpc.call("renepay", {"invstring": inv})
94 assert details["status"] == "complete"
95 assert details["amount_msat"] == send_amount
96 assert details["destination"] == l6.info["id"]
97
98
99def test_errors(node_factory, bitcoind):

Callers

nothing calls this directly

Calls 5

MillisatoshiClass · 0.90
get_nodesMethod · 0.80
join_nodesMethod · 0.80
invoiceMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected