@@ -34,14 +34,15 @@ fn channel_full_cycle() {
34
34
35
35
println ! ( "\n A -- connect_open_channel -> B" ) ;
36
36
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 ( ) ;
38
38
39
39
let funding_txo = loop {
40
40
let details = node_a. list_channels ( ) ;
41
41
42
42
if details. is_empty ( ) || details[ 0 ] . funding_txo . is_none ( ) {
43
43
std:: thread:: sleep ( Duration :: from_secs ( 1 ) ) ;
44
44
} else {
45
+ assert_eq ! ( details[ 0 ] . inbound_capacity_msat, 39000000 ) ;
45
46
break details[ 0 ] . funding_txo . unwrap ( ) ;
46
47
}
47
48
} ;
@@ -54,8 +55,8 @@ fn channel_full_cycle() {
54
55
node_b. sync_wallets ( ) . unwrap ( ) ;
55
56
56
57
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 ) ;
59
60
assert_eq ! ( node_b. on_chain_balance( ) . unwrap( ) . get_spendable( ) , 100000 ) ;
60
61
61
62
expect_event ! ( node_a, ChannelReady ) ;
@@ -174,8 +175,8 @@ fn channel_full_cycle() {
174
175
node_a. sync_wallets ( ) . unwrap ( ) ;
175
176
node_b. sync_wallets ( ) . unwrap ( ) ;
176
177
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 ) ;
179
180
180
181
node_a. stop ( ) . unwrap ( ) ;
181
182
println ! ( "\n A stopped" ) ;
@@ -214,7 +215,7 @@ fn channel_open_fails_when_funds_insufficient() {
214
215
let node_b_addr = format ! ( "{}@{}" , node_b. node_id( ) , node_b. listening_address( ) . unwrap( ) ) ;
215
216
assert_eq ! (
216
217
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 )
218
219
) ;
219
220
}
220
221
0 commit comments