(node_factory, executor)
| 335 | |
| 336 | |
| 337 | def test_xpay_timeout(node_factory, executor): |
| 338 | # ->l3-> |
| 339 | # l1->l2< >l4 |
| 340 | # ->l5-> |
| 341 | l1, l2, l3, l4, l5 = node_factory.get_nodes(5, opts={'dev-no-reconnect': None}) |
| 342 | |
| 343 | node_factory.join_nodes([l1, l2, l3, l4], wait_for_announce=True) |
| 344 | node_factory.join_nodes([l2, l5, l4], fundamount=FUNDAMOUNT // 2, wait_for_announce=True) |
| 345 | |
| 346 | # Make sure l1 sees both paths. |
| 347 | wait_for(lambda: len(l1.rpc.listchannels()['channels']) == 5 * 2) |
| 348 | |
| 349 | # Break l3->l4 |
| 350 | l3.rpc.disconnect(l4.info['id'], force=True) |
| 351 | |
| 352 | b11 = l4.rpc.invoice('100000sat', 'test_xpay_timeout', 'test_xpay_timeout')['bolt11'] |
| 353 | fut = executor.submit(l1.rpc.xpay, invstring=b11, retry_for=0) |
| 354 | |
| 355 | with pytest.raises(RpcError, match=r"Timed out after after 1 attempts"): |
| 356 | fut.result(TIMEOUT) |
| 357 | |
| 358 | |
| 359 | @pytest.mark.openchannel('v1') |
nothing calls this directly
no test coverage detected