@@ -9,6 +9,8 @@ use std::time::Duration;
99
1010use electrsd:: corepc_node:: Client as BitcoindClient ;
1111use electrsd:: electrum_client:: ElectrumApi ;
12+ #[ cfg( all( eclair_test, zero_fee_commitment_tests) ) ]
13+ use ldk_node:: ReserveType ;
1214use ldk_node:: { Event , Node } ;
1315
1416use super :: super :: external_node:: ExternalNode ;
@@ -41,6 +43,21 @@ pub(crate) async fn open_channel_to_external<E: ElectrumApi>(
4143 . map ( |ch| ch. channel_id . clone ( ) )
4244 . unwrap_or_else ( || panic ! ( "Could not find channel on external node {}" , peer. name( ) ) ) ;
4345
46+ #[ cfg( all( eclair_test, zero_fee_commitment_tests) ) ]
47+ {
48+ let channel = node
49+ . list_channels ( )
50+ . into_iter ( )
51+ . find ( |channel| channel. user_channel_id == user_channel_id)
52+ . expect ( "opened channel should be listed" ) ;
53+ let channel_type = channel. channel_type . as_ref ( ) . expect ( "channel type should be set" ) ;
54+ assert_eq ! ( channel. counterparty. node_id, ext_node_id) ;
55+ assert ! ( channel. counterparty. features. supports_anchor_zero_fee_commitments( ) ) ;
56+ assert ! ( channel_type. requires_anchor_zero_fee_commitments( ) ) ;
57+ assert_eq ! ( channel. feerate_sat_per_1000_weight, 0 ) ;
58+ assert_eq ! ( channel. reserve_type, Some ( ReserveType :: Adaptive ) ) ;
59+ }
60+
4461 ( user_channel_id, ext_channel_id)
4562}
4663
0 commit comments