l1 uses the hold_invoice plugin to delay invoice payment.
(node_factory, executor)
| 711 | |
| 712 | |
| 713 | def test_invoice_payment_hook_hold(node_factory, executor): |
| 714 | """ l1 uses the hold_invoice plugin to delay invoice payment. |
| 715 | """ |
| 716 | opts = [{}, {'plugin': os.path.join(os.getcwd(), 'tests/plugins/hold_invoice.py')}] |
| 717 | l1, l2 = node_factory.line_graph(2, opts=opts) |
| 718 | |
| 719 | inv1 = l2.rpc.invoice(1230, 'label', 'description', preimage='1' * 64) |
| 720 | |
| 721 | # This should block. |
| 722 | f = executor.submit(l1.rpc.xpay, inv1['bolt11']) |
| 723 | time.sleep(5) |
| 724 | assert not f.done() |
| 725 | |
| 726 | open(os.path.join(l2.daemon.lightning_dir, TEST_NETWORK, "unhold"), "w").close() |
| 727 | f.result(TIMEOUT) |
| 728 | |
| 729 | |
| 730 | @pytest.mark.openchannel('v1') |
nothing calls this directly
no test coverage detected