@@ -175,9 +175,19 @@ fn chanmon_claim_value_coop_close() {
175175 assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose {
176176 amount_satoshis: 1_000_000 - 1_000 - commitment_fee,
177177 transaction_fee_satoshis: commitment_fee,
178+ outbound_payment_htlc_rounded_msat: 0 ,
179+ outbound_forwarded_htlc_rounded_msat: 0 ,
180+ inbound_claiming_htlc_rounded_msat: 0 ,
181+ inbound_htlc_rounded_msat: 0 ,
178182 } ] ,
179183 nodes[ 0 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ;
180- assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose { amount_satoshis: 1_000 , transaction_fee_satoshis: 0 } ] ,
184+ assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose {
185+ amount_satoshis: 1_000 , transaction_fee_satoshis: 0 ,
186+ outbound_payment_htlc_rounded_msat: 0 ,
187+ outbound_forwarded_htlc_rounded_msat: 0 ,
188+ inbound_claiming_htlc_rounded_msat: 0 ,
189+ inbound_htlc_rounded_msat: 0 ,
190+ } ] ,
181191 nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ;
182192
183193 nodes[ 0 ] . node . close_channel ( & chan_id, & nodes[ 1 ] . node . get_our_node_id ( ) ) . unwrap ( ) ;
@@ -327,11 +337,19 @@ fn do_test_claim_value_force_close(prev_commitment_tx: bool) {
327337 assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
328338 amount_satoshis: 1_000_000 - 3_000 - 4_000 - 1_000 - 3 - commitment_tx_fee,
329339 transaction_fee_satoshis: commitment_tx_fee,
340+ outbound_payment_htlc_rounded_msat: 3000 ,
341+ outbound_forwarded_htlc_rounded_msat: 0 ,
342+ inbound_claiming_htlc_rounded_msat: 0 ,
343+ inbound_htlc_rounded_msat: 0 ,
330344 } , sent_htlc_balance. clone( ) , sent_htlc_timeout_balance. clone( ) ] ) ,
331345 sorted_vec( nodes[ 0 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
332346 assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
333347 amount_satoshis: 1_000 ,
334348 transaction_fee_satoshis: 0 ,
349+ outbound_payment_htlc_rounded_msat: 0 ,
350+ outbound_forwarded_htlc_rounded_msat: 0 ,
351+ inbound_claiming_htlc_rounded_msat: 0 ,
352+ inbound_htlc_rounded_msat: 3000 ,
335353 } , received_htlc_balance. clone( ) , received_htlc_timeout_balance. clone( ) ] ) ,
336354 sorted_vec( nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
337355
@@ -378,6 +396,10 @@ fn do_test_claim_value_force_close(prev_commitment_tx: bool) {
378396 3 - // The dust HTLC value in satoshis
379397 commitment_tx_fee,
380398 transaction_fee_satoshis: commitment_tx_fee,
399+ outbound_payment_htlc_rounded_msat: 3000 ,
400+ outbound_forwarded_htlc_rounded_msat: 0 ,
401+ inbound_claiming_htlc_rounded_msat: 0 ,
402+ inbound_htlc_rounded_msat: 0 ,
381403 } , sent_htlc_timeout_balance. clone( ) ] ;
382404 if !prev_commitment_tx {
383405 a_expected_balances. push ( sent_htlc_balance. clone ( ) ) ;
@@ -387,6 +409,10 @@ fn do_test_claim_value_force_close(prev_commitment_tx: bool) {
387409 assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose {
388410 amount_satoshis: 1_000 + 3_000 + 4_000 ,
389411 transaction_fee_satoshis: 0 ,
412+ outbound_payment_htlc_rounded_msat: 0 ,
413+ outbound_forwarded_htlc_rounded_msat: 0 ,
414+ inbound_claiming_htlc_rounded_msat: 3000 ,
415+ inbound_htlc_rounded_msat: 0 ,
390416 } ] ,
391417 nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ;
392418
@@ -796,12 +822,20 @@ fn test_no_preimage_inbound_htlc_balances() {
796822 assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
797823 amount_satoshis: 1_000_000 - 500_000 - 10_000 - commitment_tx_fee,
798824 transaction_fee_satoshis: commitment_tx_fee,
825+ outbound_payment_htlc_rounded_msat: 0 ,
826+ outbound_forwarded_htlc_rounded_msat: 0 ,
827+ inbound_claiming_htlc_rounded_msat: 0 ,
828+ inbound_htlc_rounded_msat: 0 ,
799829 } , a_received_htlc_balance. clone( ) , a_sent_htlc_balance. clone( ) ] ) ,
800830 sorted_vec( nodes[ 0 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
801831
802832 assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
803833 amount_satoshis: 500_000 - 20_000 ,
804834 transaction_fee_satoshis: 0 ,
835+ outbound_payment_htlc_rounded_msat: 0 ,
836+ outbound_forwarded_htlc_rounded_msat: 0 ,
837+ inbound_claiming_htlc_rounded_msat: 0 ,
838+ inbound_htlc_rounded_msat: 0 ,
805839 } , b_received_htlc_balance. clone( ) , b_sent_htlc_balance. clone( ) ] ) ,
806840 sorted_vec( nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
807841
@@ -1076,6 +1110,10 @@ fn do_test_revoked_counterparty_commitment_balances(confirm_htlc_spend_first: bo
10761110 assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
10771111 amount_satoshis: 100_000 - 5_000 - 4_000 - 3 - 2_000 + 3_000 ,
10781112 transaction_fee_satoshis: 0 ,
1113+ outbound_payment_htlc_rounded_msat: 3000 ,
1114+ outbound_forwarded_htlc_rounded_msat: 0 ,
1115+ inbound_claiming_htlc_rounded_msat: 0 ,
1116+ inbound_htlc_rounded_msat: 0 ,
10791117 } , Balance :: MaybeTimeoutClaimableHTLC {
10801118 amount_satoshis: 2_000 ,
10811119 claimable_height: missing_htlc_cltv_timeout,
@@ -1517,6 +1555,10 @@ fn test_revoked_counterparty_aggregated_claims() {
15171555 assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
15181556 amount_satoshis: 100_000 - 4_000 - 3_000 ,
15191557 transaction_fee_satoshis: 0 ,
1558+ outbound_payment_htlc_rounded_msat: 0 ,
1559+ outbound_forwarded_htlc_rounded_msat: 0 ,
1560+ inbound_claiming_htlc_rounded_msat: 0 ,
1561+ inbound_htlc_rounded_msat: 0 ,
15201562 } , Balance :: MaybeTimeoutClaimableHTLC {
15211563 amount_satoshis: 4_000 ,
15221564 claimable_height: htlc_cltv_timeout,
0 commit comments