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

Function test_local_htlcmax0

tests/test_renepay.py:642–650  ·  view source on GitHub ↗

Testing a simple pay route when local channels have htlcmax=0.

(node_factory)

Source from the content-addressed store, hash-verified

640
641
642def test_local_htlcmax0(node_factory):
643 """Testing a simple pay route when local channels have htlcmax=0."""
644 l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True, opts={'allow-deprecated-apis': True})
645 l1.rpc.setchannel(l2.info["id"], htlcmax=0)
646 inv = l3.rpc.invoice(123000, "test_renepay", "description")["bolt11"]
647 details = l1.rpc.call("renepay", {"invstring": inv})
648 assert details["status"] == "complete"
649 assert details["amount_msat"] == Millisatoshi(123000)
650 assert details["destination"] == l3.info["id"]
651
652
653def test_htlcmax0(node_factory):

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected