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

Function test_xpay_preapprove

tests/test_xpay.py:551–560  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

549
550
551def test_xpay_preapprove(node_factory):
552 l1, l2 = node_factory.line_graph(2, opts={'dev-hsmd-fail-preapprove': None})
553
554 inv = l2.rpc.invoice(100000, "test_xpay_preapprove", "test_xpay_preapprove")['bolt11']
555
556 with pytest.raises(RpcError, match=r"invoice was declined"):
557 l1.rpc.check('xpay', invstring=inv)
558
559 with pytest.raises(RpcError, match=r"invoice was declined"):
560 l1.rpc.xpay(inv)
561
562
563def test_xpay_maxdelay(node_factory):

Callers

nothing calls this directly

Calls 4

line_graphMethod · 0.80
invoiceMethod · 0.45
checkMethod · 0.45
xpayMethod · 0.45

Tested by

no test coverage detected