@@ -2606,6 +2606,8 @@ def test_opening_explicit_channel_type(node_factory, bitcoind):
2606
2606
ret = l1 .rpc .fundchannel_start (l2 .info ['id' ], FUNDAMOUNT ,
2607
2607
channel_type = ctype + zeroconf )
2608
2608
assert ret ['channel_type' ]['bits' ] == ctype + zeroconf
2609
+ assert only_one (l1 .rpc .listpeerchannels ()['channels' ])['channel_type' ]['bits' ] == ctype + zeroconf
2610
+ # Note: l2 doesn't show it in listpeerchannels yet...
2609
2611
l1 .rpc .fundchannel_cancel (l2 .info ['id' ])
2610
2612
2611
2613
# Zeroconf is refused to l4.
@@ -2619,6 +2621,8 @@ def test_opening_explicit_channel_type(node_factory, bitcoind):
2619
2621
for ctype in ([STATIC_REMOTEKEY ], [STATIC_REMOTEKEY , ANCHORS_ZERO_FEE_HTLC_TX ]):
2620
2622
ret = l1 .rpc .openchannel_init (l3 .info ['id' ], FUNDAMOUNT - 1000 , psbt , channel_type = ctype )
2621
2623
assert ret ['channel_type' ]['bits' ] == ctype
2624
+ assert only_one (l1 .rpc .listpeerchannels ()['channels' ])['channel_type' ]['bits' ] == ctype
2625
+ assert only_one (l3 .rpc .listpeerchannels ()['channels' ])['channel_type' ]['bits' ] == ctype
2622
2626
l1 .rpc .openchannel_abort (ret ['channel_id' ])
2623
2627
2624
2628
# Old anchors not supported for new channels
@@ -2652,13 +2656,17 @@ def test_opening_explicit_channel_type(node_factory, bitcoind):
2652
2656
2653
2657
ret = l1 .rpc .fundchannel_start (l2 .info ['id' ], FUNDAMOUNT , channel_type = [STATIC_REMOTEKEY , ANCHORS_OLD ])
2654
2658
assert ret ['channel_type' ]['bits' ] == [STATIC_REMOTEKEY , ANCHORS_OLD ]
2659
+ assert only_one (l1 .rpc .listpeerchannels ()['channels' ])['channel_type' ]['bits' ] == [STATIC_REMOTEKEY , ANCHORS_OLD ]
2660
+ # Note: l3 doesn't show it in listpeerchannels yet...
2655
2661
l1 .rpc .fundchannel_cancel (l2 .info ['id' ])
2656
2662
2657
2663
l1 .rpc .unreserveinputs (psbt )
2658
2664
2659
2665
# Works with fundchannel / multifundchannel
2660
2666
ret = l1 .rpc .fundchannel (l2 .info ['id' ], FUNDAMOUNT // 3 , channel_type = [STATIC_REMOTEKEY ])
2661
2667
assert ret ['channel_type' ]['bits' ] == [STATIC_REMOTEKEY ]
2668
+ assert only_one (l1 .rpc .listpeerchannels ()['channels' ])['channel_type' ]['bits' ] == [STATIC_REMOTEKEY ]
2669
+ assert only_one (l2 .rpc .listpeerchannels ()['channels' ])['channel_type' ]['bits' ] == [STATIC_REMOTEKEY ]
2662
2670
# FIXME: Check type is actually correct!
2663
2671
2664
2672
# Mine that so we can spend change.
@@ -2668,3 +2676,5 @@ def test_opening_explicit_channel_type(node_factory, bitcoind):
2668
2676
l1 .connect (l3 )
2669
2677
ret = l1 .rpc .fundchannel (l3 .info ['id' ], FUNDAMOUNT // 3 , channel_type = [STATIC_REMOTEKEY ])
2670
2678
assert ret ['channel_type' ]['bits' ] == [STATIC_REMOTEKEY ]
2679
+ assert only_one (l1 .rpc .listpeerchannels (l3 .info ['id' ])['channels' ])['channel_type' ]['bits' ] == [STATIC_REMOTEKEY ]
2680
+ assert only_one (l3 .rpc .listpeerchannels ()['channels' ])['channel_type' ]['bits' ] == [STATIC_REMOTEKEY ]
0 commit comments