If we're not going to give you zeroconf, we should tell you!
(bitcoind, node_factory, chainparams)
| 2460 | |
| 2461 | |
| 2462 | def test_zeroconf_refusal(bitcoind, node_factory, chainparams): |
| 2463 | """If we're not going to give you zeroconf, we should tell you!""" |
| 2464 | l1, l2 = node_factory.get_nodes(2) |
| 2465 | l1.fundwallet(10**6) |
| 2466 | l1.connect(l2) |
| 2467 | |
| 2468 | # option_static_remotekey, option_zeroconf |
| 2469 | ctype = [12, 50] |
| 2470 | # No anchors for elements |
| 2471 | if not chainparams['elements']: |
| 2472 | ctype += [22] |
| 2473 | with pytest.raises(RpcError, match="You required zeroconf, but you're not on our allowlist"): |
| 2474 | l1.rpc.fundchannel(l2.info['id'], 'all', channel_type=ctype) |
| 2475 | |
| 2476 | # OK, let's add ourselves to allow list. |
| 2477 | plugin_path = str(Path(__file__).parent / "plugins" / "zeroconf-selective.py") |
| 2478 | l2.rpc.plugin_start(plugin_path, zeroconf_allow=l1.info['id']) |
| 2479 | l1.rpc.fundchannel(l2.info['id'], 'all', channel_type=ctype) |
| 2480 | |
| 2481 | |
| 2482 | @pytest.mark.openchannel('v1') |
nothing calls this directly
no test coverage detected