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

Function test_blinded_path_max

tests/test_pay.py:7283–7290  ·  view source on GitHub ↗

We have a bug where we can create a invoice_blindedpay with 0 htlc_maximum_msat.

(node_factory)

Source from the content-addressed store, hash-verified

7281
7282
7283def test_blinded_path_max(node_factory):
7284 """We have a bug where we can create a invoice_blindedpay with 0 htlc_maximum_msat."""
7285 l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True)
7286
7287 # l2, having no advertized address, will use l1 or l3 as fronting nodes.
7288 offer = l2.rpc.offer('any')['bolt12']
7289 inv = l1.rpc.fetchinvoice(offer, '10000msat')['invoice']
7290 assert only_one(l1.rpc.decode(inv)['invoice_paths'])['payinfo']['htlc_maximum_msat'] > 0, f"bad paths for offer = {offer}, invoice = {inv}"
7291
7292
7293def test_createproof(node_factory, bitcoind):

Callers

nothing calls this directly

Calls 5

only_oneFunction · 0.90
line_graphMethod · 0.80
fetchinvoiceMethod · 0.80
offerMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected