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

Function test_xpay_unannounced

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

Source from the content-addressed store, hash-verified

570
571
572def test_xpay_unannounced(node_factory):
573 l1, l2 = node_factory.line_graph(2, announce_channels=False)
574
575 # BOLT-11, direct peer
576 b11 = l2.rpc.invoice('10000msat', 'test_xpay_unannounced', 'test_xpay_unannounced bolt11')['bolt11']
577 ret = l1.rpc.xpay(b11)
578 assert ret['failed_parts'] == 0
579 assert ret['successful_parts'] == 1
580 assert ret['amount_msat'] == 10000
581 assert ret['amount_sent_msat'] == 10000
582
583 # BOLT-12, direct peer
584 offer = l2.rpc.offer('any')['bolt12']
585 b12 = l1.rpc.fetchinvoice(offer, '100000msat')['invoice']
586 l1.rpc.xpay(b12)
587
588
589def test_xpay_zeroconf(node_factory):

Callers

nothing calls this directly

Calls 5

line_graphMethod · 0.80
fetchinvoiceMethod · 0.80
invoiceMethod · 0.45
xpayMethod · 0.45
offerMethod · 0.45

Tested by

no test coverage detected