@@ -628,7 +628,7 @@ fn assert_action_timeout_awaiting_response(action: &msgs::ErrorAction) {
628628 ) ;
629629}
630630
631- #[ derive( Copy , Clone ) ]
631+ #[ derive( Clone , Copy , PartialEq ) ]
632632enum ChanType {
633633 Legacy ,
634634 KeyedAnchors ,
@@ -2082,19 +2082,20 @@ impl<'a, Out: Output + MaybeSend + MaybeSync> Harness<'a, Out> {
20822082 connect_peers ( & nodes[ 0 ] , & nodes[ 1 ] ) ;
20832083 connect_peers ( & nodes[ 1 ] , & nodes[ 2 ] ) ;
20842084
2085+ let set_0reserve = chan_type != ChanType :: Legacy ;
20852086 // Create 3 channels between A-B and 3 channels between B-C (6 total).
20862087 //
20872088 // Use distinct version numbers for each funding transaction so each test
20882089 // channel gets its own txid and funding outpoint.
20892090 // A-B: channel 2 A and B have 0-reserve (trusted open + trusted accept),
2090- // channel 3 A has 0-reserve (trusted accept).
2091+ // channel 3 A has 0-reserve (trusted accept), if channels are non-legacy .
20912092 make_channel ( & nodes[ 0 ] , & nodes[ 1 ] , 1 , false , false , & mut chain_state) ;
2092- make_channel ( & nodes[ 0 ] , & nodes[ 1 ] , 2 , true , true , & mut chain_state) ;
2093- make_channel ( & nodes[ 0 ] , & nodes[ 1 ] , 3 , false , true , & mut chain_state) ;
2093+ make_channel ( & nodes[ 0 ] , & nodes[ 1 ] , 2 , set_0reserve , set_0reserve , & mut chain_state) ;
2094+ make_channel ( & nodes[ 0 ] , & nodes[ 1 ] , 3 , false , set_0reserve , & mut chain_state) ;
20942095 // B-C: channel 4 B has 0-reserve (via trusted accept),
2095- // channel 5 C has 0-reserve (via trusted open).
2096- make_channel ( & nodes[ 1 ] , & nodes[ 2 ] , 4 , false , true , & mut chain_state) ;
2097- make_channel ( & nodes[ 1 ] , & nodes[ 2 ] , 5 , true , false , & mut chain_state) ;
2096+ // channel 5 C has 0-reserve (via trusted open), if channels are non-legacy .
2097+ make_channel ( & nodes[ 1 ] , & nodes[ 2 ] , 4 , false , set_0reserve , & mut chain_state) ;
2098+ make_channel ( & nodes[ 1 ] , & nodes[ 2 ] , 5 , set_0reserve , false , & mut chain_state) ;
20982099 make_channel ( & nodes[ 1 ] , & nodes[ 2 ] , 6 , false , false , & mut chain_state) ;
20992100
21002101 // Wipe the transactions-broadcasted set to make sure we don't broadcast
0 commit comments