@@ -2614,6 +2614,8 @@ def test_opening_explicit_channel_type(node_factory, bitcoind):
2614
2614
ret = l1 .rpc .fundchannel_start (l2 .info ['id' ], FUNDAMOUNT ,
2615
2615
channel_type = ctype + zeroconf )
2616
2616
assert ret ['channel_type' ]['bits' ] == ctype + zeroconf
2617
+ assert only_one (l1 .rpc .listpeerchannels ()['channels' ])['channel_type' ]['bits' ] == ctype + zeroconf
2618
+ # Note: l2 doesn't show it in listpeerchannels yet...
2617
2619
l1 .rpc .fundchannel_cancel (l2 .info ['id' ])
2618
2620
2619
2621
# Zeroconf is refused to l4.
@@ -2627,6 +2629,8 @@ def test_opening_explicit_channel_type(node_factory, bitcoind):
2627
2629
for ctype in ([STATIC_REMOTEKEY ], [STATIC_REMOTEKEY , ANCHORS_ZERO_FEE_HTLC_TX ]):
2628
2630
ret = l1 .rpc .openchannel_init (l3 .info ['id' ], FUNDAMOUNT - 1000 , psbt , channel_type = ctype )
2629
2631
assert ret ['channel_type' ]['bits' ] == ctype
2632
+ assert only_one (l1 .rpc .listpeerchannels ()['channels' ])['channel_type' ]['bits' ] == ctype
2633
+ assert only_one (l3 .rpc .listpeerchannels ()['channels' ])['channel_type' ]['bits' ] == ctype
2630
2634
l1 .rpc .openchannel_abort (ret ['channel_id' ])
2631
2635
2632
2636
# Old anchors not supported for new channels
@@ -2660,13 +2664,17 @@ def test_opening_explicit_channel_type(node_factory, bitcoind):
2660
2664
2661
2665
ret = l1 .rpc .fundchannel_start (l2 .info ['id' ], FUNDAMOUNT , channel_type = [STATIC_REMOTEKEY , ANCHORS_OLD ])
2662
2666
assert ret ['channel_type' ]['bits' ] == [STATIC_REMOTEKEY , ANCHORS_OLD ]
2667
+ assert only_one (l1 .rpc .listpeerchannels ()['channels' ])['channel_type' ]['bits' ] == [STATIC_REMOTEKEY , ANCHORS_OLD ]
2668
+ # Note: l3 doesn't show it in listpeerchannels yet...
2663
2669
l1 .rpc .fundchannel_cancel (l2 .info ['id' ])
2664
2670
2665
2671
l1 .rpc .unreserveinputs (psbt )
2666
2672
2667
2673
# Works with fundchannel / multifundchannel
2668
2674
ret = l1 .rpc .fundchannel (l2 .info ['id' ], FUNDAMOUNT // 3 , channel_type = [STATIC_REMOTEKEY ])
2669
2675
assert ret ['channel_type' ]['bits' ] == [STATIC_REMOTEKEY ]
2676
+ assert only_one (l1 .rpc .listpeerchannels ()['channels' ])['channel_type' ]['bits' ] == [STATIC_REMOTEKEY ]
2677
+ assert only_one (l2 .rpc .listpeerchannels ()['channels' ])['channel_type' ]['bits' ] == [STATIC_REMOTEKEY ]
2670
2678
# FIXME: Check type is actually correct!
2671
2679
2672
2680
# Mine that so we can spend change.
@@ -2676,3 +2684,5 @@ def test_opening_explicit_channel_type(node_factory, bitcoind):
2676
2684
l1 .connect (l3 )
2677
2685
ret = l1 .rpc .fundchannel (l3 .info ['id' ], FUNDAMOUNT // 3 , channel_type = [STATIC_REMOTEKEY ])
2678
2686
assert ret ['channel_type' ]['bits' ] == [STATIC_REMOTEKEY ]
2687
+ assert only_one (l1 .rpc .listpeerchannels (l3 .info ['id' ])['channels' ])['channel_type' ]['bits' ] == [STATIC_REMOTEKEY ]
2688
+ assert only_one (l3 .rpc .listpeerchannels ()['channels' ])['channel_type' ]['bits' ] == [STATIC_REMOTEKEY ]
0 commit comments