@@ -1004,11 +1004,12 @@ fn lsps2_client_service_integration() {
10041004
10051005 // Setup three nodes: service, client, and payer
10061006 let channel_opening_fee_ppm = 10_000 ;
1007+ let channel_over_provisioning_ppm = 100_000 ;
10071008 let lsps2_service_config = LSPS2ServiceConfig {
10081009 require_token : None ,
10091010 advertise_service : false ,
10101011 channel_opening_fee_ppm,
1011- channel_over_provisioning_ppm : 100_000 ,
1012+ channel_over_provisioning_ppm,
10121013 max_payment_size_msat : 1_000_000_000 ,
10131014 min_payment_size_msat : 0 ,
10141015 min_channel_lifetime : 100 ,
@@ -1084,7 +1085,14 @@ fn lsps2_client_service_integration() {
10841085 expect_channel_ready_event ! ( client_node, service_node. node_id( ) ) ;
10851086
10861087 let service_fee_msat = ( jit_amount_msat * channel_opening_fee_ppm as u64 ) / 1_000_000 ;
1087- let expected_amount = jit_amount_msat - service_fee_msat;
1088+ let expected_received_amount_msat = jit_amount_msat - service_fee_msat;
10881089 expect_payment_successful_event ! ( payer_node, Some ( payment_id) , None ) ;
1089- expect_payment_received_event ! ( client_node, expected_amount) ;
1090+ expect_payment_received_event ! ( client_node, expected_received_amount_msat) ;
1091+
1092+ let expected_channel_overprovisioning_msat =
1093+ ( expected_received_amount_msat * channel_over_provisioning_ppm as u64 ) / 1_000_000 ;
1094+ let expected_channel_size_sat =
1095+ ( expected_received_amount_msat + expected_channel_overprovisioning_msat) / 1000 ;
1096+ let channel_value_sats = client_node. list_channels ( ) . first ( ) . unwrap ( ) . channel_value_sats ;
1097+ assert_eq ! ( channel_value_sats, expected_channel_size_sat) ;
10901098}
0 commit comments