@@ -34,14 +34,15 @@ fn channel_full_cycle() {
3434
3535 println ! ( "\n A -- connect_open_channel -> B" ) ;
3636 let node_b_addr = format ! ( "{}@{}" , node_b. node_id( ) , node_b. listening_address( ) . unwrap( ) ) ;
37- node_a. connect_open_channel ( & node_b_addr, 50000 , true ) . unwrap ( ) ;
37+ node_a. connect_open_channel ( & node_b_addr, 80_000 , Some ( 40_000 * 1000 ) , true ) . unwrap ( ) ;
3838
3939 let funding_txo = loop {
4040 let details = node_a. list_channels ( ) ;
4141
4242 if details. is_empty ( ) || details[ 0 ] . funding_txo . is_none ( ) {
4343 std:: thread:: sleep ( Duration :: from_secs ( 1 ) ) ;
4444 } else {
45+ assert_eq ! ( details[ 0 ] . inbound_capacity_msat, 39000000 ) ;
4546 break details[ 0 ] . funding_txo . unwrap ( ) ;
4647 }
4748 } ;
@@ -54,8 +55,8 @@ fn channel_full_cycle() {
5455 node_b. sync_wallets ( ) . unwrap ( ) ;
5556
5657 let node_a_balance = node_a. on_chain_balance ( ) . unwrap ( ) ;
57- assert ! ( node_a_balance. get_spendable( ) < 50000 ) ;
58- assert ! ( node_a_balance. get_spendable( ) > 40000 ) ;
58+ assert ! ( node_a_balance. get_spendable( ) < 20000 ) ;
59+ assert ! ( node_a_balance. get_spendable( ) > 15000 ) ;
5960 assert_eq ! ( node_b. on_chain_balance( ) . unwrap( ) . get_spendable( ) , 100000 ) ;
6061
6162 expect_event ! ( node_a, ChannelReady ) ;
@@ -174,8 +175,8 @@ fn channel_full_cycle() {
174175 node_a. sync_wallets ( ) . unwrap ( ) ;
175176 node_b. sync_wallets ( ) . unwrap ( ) ;
176177
177- assert ! ( node_a. on_chain_balance( ) . unwrap( ) . get_spendable( ) > 90000 ) ;
178- assert_eq ! ( node_b. on_chain_balance( ) . unwrap( ) . get_spendable( ) , 103234 ) ;
178+ assert ! ( node_a. on_chain_balance( ) . unwrap( ) . get_spendable( ) > 50000 ) ;
179+ assert_eq ! ( node_b. on_chain_balance( ) . unwrap( ) . get_spendable( ) , 143234 ) ;
179180
180181 node_a. stop ( ) . unwrap ( ) ;
181182 println ! ( "\n A stopped" ) ;
@@ -214,7 +215,7 @@ fn channel_open_fails_when_funds_insufficient() {
214215 let node_b_addr = format ! ( "{}@{}" , node_b. node_id( ) , node_b. listening_address( ) . unwrap( ) ) ;
215216 assert_eq ! (
216217 Err ( Error :: InsufficientFunds ) ,
217- node_a. connect_open_channel( & node_b_addr, 120000 , true )
218+ node_a. connect_open_channel( & node_b_addr, 120000 , None , true )
218219 ) ;
219220}
220221
0 commit comments