@@ -181,14 +181,15 @@ fn channel_full_cycle() {
181
181
182
182
println ! ( "\n A -- connect_open_channel -> B" ) ;
183
183
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 ( ) ;
185
185
186
186
let funding_txo = loop {
187
187
let details = node_a. list_channels ( ) ;
188
188
189
189
if details. is_empty ( ) || details[ 0 ] . funding_txo . is_none ( ) {
190
190
std:: thread:: sleep ( Duration :: from_secs ( 1 ) ) ;
191
191
} else {
192
+ assert_eq ! ( details[ 0 ] . inbound_capacity_msat, 39000000 ) ;
192
193
break details[ 0 ] . funding_txo . unwrap ( ) ;
193
194
}
194
195
} ;
@@ -201,8 +202,8 @@ fn channel_full_cycle() {
201
202
node_b. sync_wallets ( ) . unwrap ( ) ;
202
203
203
204
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 ) ;
206
207
assert_eq ! ( node_b. on_chain_balance( ) . unwrap( ) . get_spendable( ) , 100000 ) ;
207
208
208
209
expect_event ! ( node_a, ChannelReady ) ;
@@ -282,8 +283,8 @@ fn channel_full_cycle() {
282
283
node_a. sync_wallets ( ) . unwrap ( ) ;
283
284
node_b. sync_wallets ( ) . unwrap ( ) ;
284
285
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 ) ;
287
288
288
289
node_a. stop ( ) . unwrap ( ) ;
289
290
println ! ( "\n A stopped" ) ;
@@ -315,7 +316,7 @@ fn channel_open_fails_when_funds_insufficient() {
315
316
let node_b_addr = format ! ( "{}@{}" , node_b. node_id( ) , node_b. listening_address( ) . unwrap( ) ) ;
316
317
assert_eq ! (
317
318
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 )
319
320
) ;
320
321
}
321
322
0 commit comments