l3 creates an invoice, l2 knows the preimage and will shortcircuit.
(node_factory)
| 1251 | |
| 1252 | |
| 1253 | def test_htlc_accepted_hook_resolve(node_factory): |
| 1254 | """l3 creates an invoice, l2 knows the preimage and will shortcircuit. |
| 1255 | """ |
| 1256 | l1, l2, l3 = node_factory.line_graph(3, opts=[ |
| 1257 | {}, |
| 1258 | {'plugin': os.path.join(os.getcwd(), 'tests/plugins/shortcircuit.py')}, |
| 1259 | {} |
| 1260 | ], wait_for_announce=True) |
| 1261 | |
| 1262 | inv = l3.rpc.invoice(amount_msat=1000, label="lbl", description="desc", preimage="00" * 32)['bolt11'] |
| 1263 | l1.rpc.xpay(inv) |
| 1264 | |
| 1265 | # And the invoice must still be unpaid |
| 1266 | inv = l3.rpc.listinvoices("lbl")['invoices'] |
| 1267 | assert len(inv) == 1 and inv[0]['status'] == 'unpaid' |
| 1268 | |
| 1269 | |
| 1270 | def test_htlc_accepted_hook_direct_restart(node_factory, executor): |
nothing calls this directly
no test coverage detected