@@ -181,14 +181,15 @@ fn channel_full_cycle() {
181181
182182 println ! ( "\n A -- connect_open_channel -> B" ) ;
183183 let node_b_addr = format ! ( "{}@{}" , node_b. node_id( ) , node_b. listening_address( ) . unwrap( ) ) ;
184- node_a. connect_open_channel ( & node_b_addr, 50000 , true ) . unwrap ( ) ;
184+ node_a. connect_open_channel ( & node_b_addr, 80_000 , Some ( 40_000 * 1000 ) , true ) . unwrap ( ) ;
185185
186186 let funding_txo = loop {
187187 let details = node_a. list_channels ( ) ;
188188
189189 if details. is_empty ( ) || details[ 0 ] . funding_txo . is_none ( ) {
190190 std:: thread:: sleep ( Duration :: from_secs ( 1 ) ) ;
191191 } else {
192+ assert_eq ! ( details[ 0 ] . inbound_capacity_msat, 39000000 ) ;
192193 break details[ 0 ] . funding_txo . unwrap ( ) ;
193194 }
194195 } ;
@@ -201,8 +202,8 @@ fn channel_full_cycle() {
201202 node_b. sync_wallets ( ) . unwrap ( ) ;
202203
203204 let node_a_balance = node_a. on_chain_balance ( ) . unwrap ( ) ;
204- assert ! ( node_a_balance. get_spendable( ) < 50000 ) ;
205- assert ! ( node_a_balance. get_spendable( ) > 40000 ) ;
205+ assert ! ( node_a_balance. get_spendable( ) < 20000 ) ;
206+ assert ! ( node_a_balance. get_spendable( ) > 15000 ) ;
206207 assert_eq ! ( node_b. on_chain_balance( ) . unwrap( ) . get_spendable( ) , 100000 ) ;
207208
208209 expect_event ! ( node_a, ChannelReady ) ;
@@ -282,8 +283,8 @@ fn channel_full_cycle() {
282283 node_a. sync_wallets ( ) . unwrap ( ) ;
283284 node_b. sync_wallets ( ) . unwrap ( ) ;
284285
285- assert ! ( node_a. on_chain_balance( ) . unwrap( ) . get_spendable( ) > 90000 ) ;
286- assert_eq ! ( node_b. on_chain_balance( ) . unwrap( ) . get_spendable( ) , 103234 ) ;
286+ assert ! ( node_a. on_chain_balance( ) . unwrap( ) . get_spendable( ) > 50000 ) ;
287+ assert_eq ! ( node_b. on_chain_balance( ) . unwrap( ) . get_spendable( ) , 143234 ) ;
287288
288289 node_a. stop ( ) . unwrap ( ) ;
289290 println ! ( "\n A stopped" ) ;
@@ -315,7 +316,7 @@ fn channel_open_fails_when_funds_insufficient() {
315316 let node_b_addr = format ! ( "{}@{}" , node_b. node_id( ) , node_b. listening_address( ) . unwrap( ) ) ;
316317 assert_eq ! (
317318 Err ( Error :: InsufficientFunds ) ,
318- node_a. connect_open_channel( & node_b_addr, 120000 , true )
319+ node_a. connect_open_channel( & node_b_addr, 120000 , None , true )
319320 ) ;
320321}
321322
0 commit comments