File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1836,6 +1836,26 @@ def test_zeroconf_forward(node_factory, bitcoind):
18361836 l3 .rpc .pay (inv )
18371837
18381838
1839+ def test_zeroconf_refusal (bitcoind , node_factory , chainparams ):
1840+ """If we're not going to give you zeroconf, we should tell you!"""
1841+ l1 , l2 = node_factory .get_nodes (2 )
1842+ l1 .fundwallet (10 ** 6 )
1843+ l1 .connect (l2 )
1844+
1845+ # option_static_remotekey, option_zeroconf
1846+ ctype = [12 , 50 ]
1847+ # No anchors for elements
1848+ if not chainparams ['elements' ]:
1849+ ctype += [22 ]
1850+ with pytest .raises (RpcError , match = "You required zeroconf, but you're not on our allowlist" ):
1851+ l1 .rpc .fundchannel (l2 .info ['id' ], 'all' , channel_type = ctype )
1852+
1853+ # OK, let's add ourselves to allow list.
1854+ plugin_path = str (Path (__file__ ).parent / "plugins" / "zeroconf-selective.py" )
1855+ l2 .rpc .plugin_start (plugin_path , zeroconf_allow = l1 .info ['id' ])
1856+ l1 .rpc .fundchannel (l2 .info ['id' ], 'all' , channel_type = ctype )
1857+
1858+
18391859@pytest .mark .openchannel ('v1' )
18401860def test_buy_liquidity_ad_no_v2 (node_factory , bitcoind ):
18411861 """ Test that you can't actually request amt for a
You can’t perform that action at this time.
0 commit comments