Stop sendpsbt, check it eventually opens
(bitcoind, node_factory)
| 3479 | |
| 3480 | @pytest.mark.openchannel('v1') |
| 3481 | def test_sendpsbt_crash(bitcoind, node_factory): |
| 3482 | """Stop sendpsbt, check it eventually opens""" |
| 3483 | plugin_path = Path(__file__).parent / "plugins" / "stop_sendpsbt.py" |
| 3484 | l1, l2 = node_factory.get_nodes(2, opts=[{"plugin": plugin_path, 'may_fail': True, 'start': False}, {}]) |
| 3485 | # Saving IO can cause JSON errors when we check it, due to partial writes if we |
| 3486 | # get lucky when we kill it. |
| 3487 | del l1.daemon.opts['dev-save-plugin-io'] |
| 3488 | l1.start() |
| 3489 | |
| 3490 | l1.fundwallet(3_000_000) |
| 3491 | l1.connect(l2) |
| 3492 | |
| 3493 | # signpsbt kills l1. |
| 3494 | with pytest.raises(RpcError, match=r'Connection to RPC server lost.'): |
| 3495 | l1.rpc.fundchannel(l2.info['id'], "2000000sat") |
| 3496 | |
| 3497 | del l1.daemon.opts['plugin'] |
| 3498 | l1.start() |
| 3499 | bitcoind.generate_block(1, wait_for_mempool=1) |
| 3500 | |
| 3501 | assert l1.daemon.is_in_log('Signed and sent psbt for waiting channel') |
| 3502 | |
| 3503 | |
| 3504 | @pytest.mark.parametrize("stay_withheld", [True, False]) |
nothing calls this directly
no test coverage detected