l2 uses a plugin that should fatal() crash the node. This is because the plugin rejects a channel while also setting a close_to address which isn't allowed.
(node_factory, bitcoind)
| 795 | @pytest.mark.openchannel('v1') |
| 796 | @pytest.mark.openchannel('v2') |
| 797 | def test_openchannel_hook_error_handling(node_factory, bitcoind): |
| 798 | """ l2 uses a plugin that should fatal() crash the node. |
| 799 | |
| 800 | This is because the plugin rejects a channel while |
| 801 | also setting a close_to address which isn't allowed. |
| 802 | """ |
| 803 | opts = {'plugin': os.path.join(os.getcwd(), 'tests/plugins/openchannel_hook_accepter.py')} |
| 804 | # openchannel_reject_but_set_close_to.py')} |
| 805 | l1 = node_factory.get_node() |
| 806 | l2 = node_factory.get_node(options=opts, |
| 807 | expect_fail=True, |
| 808 | broken_log='lightningd: ', |
| 809 | may_fail=True) |
| 810 | l1.connect(l2) |
| 811 | l1.fundwallet(10**6) |
| 812 | |
| 813 | # next fundchannel should fail fatal() for l2 |
| 814 | with pytest.raises(RpcError, match=r'Owning subdaemon (openingd|dualopend) died'): |
| 815 | l1.rpc.fundchannel(l2.info['id'], 100004) |
| 816 | assert l2.daemon.is_in_log("BROKEN.*Plugin rejected openchannel[2]? but also set close_to") |
| 817 | |
| 818 | |
| 819 | @pytest.mark.openchannel('v1') |
nothing calls this directly
no test coverage detected