(node_factory)
| 570 | |
| 571 | |
| 572 | def 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 | |
| 589 | def test_xpay_zeroconf(node_factory): |
nothing calls this directly
no test coverage detected