diff --git a/tests/test_opening.py b/tests/test_opening.py index f96a473cc424..14e3abad3e9b 100644 --- a/tests/test_opening.py +++ b/tests/test_opening.py @@ -2606,6 +2606,8 @@ def test_opening_explicit_channel_type(node_factory, bitcoind): ret = l1.rpc.fundchannel_start(l2.info['id'], FUNDAMOUNT, channel_type=ctype + zeroconf) assert ret['channel_type']['bits'] == ctype + zeroconf + assert only_one(l1.rpc.listpeerchannels()['channels'])['channel_type']['bits'] == ctype + zeroconf + # Note: l2 doesn't show it in listpeerchannels yet... l1.rpc.fundchannel_cancel(l2.info['id']) # Zeroconf is refused to l4. @@ -2619,6 +2621,8 @@ def test_opening_explicit_channel_type(node_factory, bitcoind): for ctype in ([STATIC_REMOTEKEY], [STATIC_REMOTEKEY, ANCHORS_ZERO_FEE_HTLC_TX]): ret = l1.rpc.openchannel_init(l3.info['id'], FUNDAMOUNT - 1000, psbt, channel_type=ctype) assert ret['channel_type']['bits'] == ctype + assert only_one(l1.rpc.listpeerchannels()['channels'])['channel_type']['bits'] == ctype + assert only_one(l3.rpc.listpeerchannels()['channels'])['channel_type']['bits'] == ctype l1.rpc.openchannel_abort(ret['channel_id']) # Old anchors not supported for new channels @@ -2652,6 +2656,8 @@ def test_opening_explicit_channel_type(node_factory, bitcoind): ret = l1.rpc.fundchannel_start(l2.info['id'], FUNDAMOUNT, channel_type=[STATIC_REMOTEKEY, ANCHORS_OLD]) assert ret['channel_type']['bits'] == [STATIC_REMOTEKEY, ANCHORS_OLD] + assert only_one(l1.rpc.listpeerchannels()['channels'])['channel_type']['bits'] == [STATIC_REMOTEKEY, ANCHORS_OLD] + # Note: l3 doesn't show it in listpeerchannels yet... l1.rpc.fundchannel_cancel(l2.info['id']) l1.rpc.unreserveinputs(psbt) @@ -2659,6 +2665,8 @@ def test_opening_explicit_channel_type(node_factory, bitcoind): # Works with fundchannel / multifundchannel ret = l1.rpc.fundchannel(l2.info['id'], FUNDAMOUNT // 3, channel_type=[STATIC_REMOTEKEY]) assert ret['channel_type']['bits'] == [STATIC_REMOTEKEY] + assert only_one(l1.rpc.listpeerchannels()['channels'])['channel_type']['bits'] == [STATIC_REMOTEKEY] + assert only_one(l2.rpc.listpeerchannels()['channels'])['channel_type']['bits'] == [STATIC_REMOTEKEY] # FIXME: Check type is actually correct! # Mine that so we can spend change. @@ -2668,3 +2676,5 @@ def test_opening_explicit_channel_type(node_factory, bitcoind): l1.connect(l3) ret = l1.rpc.fundchannel(l3.info['id'], FUNDAMOUNT // 3, channel_type=[STATIC_REMOTEKEY]) assert ret['channel_type']['bits'] == [STATIC_REMOTEKEY] + assert only_one(l1.rpc.listpeerchannels(l3.info['id'])['channels'])['channel_type']['bits'] == [STATIC_REMOTEKEY] + assert only_one(l3.rpc.listpeerchannels()['channels'])['channel_type']['bits'] == [STATIC_REMOTEKEY]