@@ -2059,7 +2059,7 @@ mod tests {
2059
2059
do_encoding_channel_update ( true , true , true , true ) ;
2060
2060
}
2061
2061
2062
- fn do_encoding_open_channel ( random_bit : bool , shutdown : bool , chan_type : bool ) {
2062
+ fn do_encoding_open_channel ( random_bit : bool , shutdown : bool , incl_chan_type : bool ) {
2063
2063
let secp_ctx = Secp256k1 :: new ( ) ;
2064
2064
let ( _, pubkey_1) = get_keys_from ! ( "0101010101010101010101010101010101010101010101010101010101010101" , secp_ctx) ;
2065
2065
let ( _, pubkey_2) = get_keys_from ! ( "0202020202020202020202020202020202020202020202020202020202020202" , secp_ctx) ;
@@ -2087,7 +2087,7 @@ mod tests {
2087
2087
first_per_commitment_point : pubkey_6,
2088
2088
channel_flags : if random_bit { 1 << 5 } else { 0 } ,
2089
2089
shutdown_scriptpubkey : if shutdown { OptionalField :: Present ( Address :: p2pkh ( & :: bitcoin:: PublicKey { compressed : true , key : pubkey_1} , Network :: Testnet ) . script_pubkey ( ) ) } else { OptionalField :: Absent } ,
2090
- channel_type : if chan_type { Some ( ChannelTypeFeatures :: empty ( ) ) } else { None } ,
2090
+ channel_type : if incl_chan_type { Some ( ChannelTypeFeatures :: empty ( ) ) } else { None } ,
2091
2091
} ;
2092
2092
let encoded_value = open_channel. encode ( ) ;
2093
2093
let mut target_value = Vec :: new ( ) ;
@@ -2101,7 +2101,7 @@ mod tests {
2101
2101
if shutdown {
2102
2102
target_value. append ( & mut hex:: decode ( "001976a91479b000887626b294a914501a4cd226b58b23598388ac" ) . unwrap ( ) ) ;
2103
2103
}
2104
- if chan_type {
2104
+ if incl_chan_type {
2105
2105
target_value. append ( & mut hex:: decode ( "0100" ) . unwrap ( ) ) ;
2106
2106
}
2107
2107
assert_eq ! ( encoded_value, target_value) ;
0 commit comments