MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_nonstatic_channel

Function test_nonstatic_channel

tests/test_connection.py:3723–3740  ·  view source on GitHub ↗

Smoke test for a channel without option_static_remotekey

(node_factory, bitcoind)

Source from the content-addressed store, hash-verified

3721
3722
3723def test_nonstatic_channel(node_factory, bitcoind):
3724 """Smoke test for a channel without option_static_remotekey"""
3725 l1, l2 = node_factory.get_nodes(2,
3726 # This forces us to allow send/recv of non-static-remotekey!
3727 opts={'dev-any-channel-type': None})
3728 l1.fundwallet(2000000)
3729 l1.rpc.connect(l2.info['id'], 'localhost', port=l2.port)
3730 l1.rpc.fundchannel(l2.info['id'], 'all', channel_type=[])
3731 bitcoind.generate_block(1, wait_for_mempool=1)
3732
3733 chan = only_one(l1.rpc.listpeerchannels()['channels'])
3734 assert 'option_static_remotekey' not in chan['features']
3735 assert 'option_anchor' not in chan['features']
3736 assert 'option_anchors_zero_fee_htlc_tx' not in chan['features']
3737 wait_for(lambda: only_one(l1.rpc.listpeerchannels()['channels'])['state'] == 'CHANNELD_NORMAL')
3738
3739 l1.pay(l2, 1000)
3740 l1.rpc.close(l2.info['id'])
3741
3742
3743@pytest.mark.skip('needs blackhold support')

Callers

nothing calls this directly

Calls 10

only_oneFunction · 0.90
wait_forFunction · 0.90
get_nodesMethod · 0.80
fundwalletMethod · 0.80
generate_blockMethod · 0.80
listpeerchannelsMethod · 0.80
connectMethod · 0.45
fundchannelMethod · 0.45
payMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected