@@ -242,9 +242,19 @@ fn do_chanmon_claim_value_coop_close(anchors: bool) {
242242 assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose {
243243 amount_satoshis: 1_000_000 - 1_000 - commitment_tx_fee - anchor_outputs_value,
244244 transaction_fee_satoshis: commitment_tx_fee,
245+ outbound_payment_htlc_rounded_msat: 0 ,
246+ outbound_forwarded_htlc_rounded_msat: 0 ,
247+ inbound_claiming_htlc_rounded_msat: 0 ,
248+ inbound_htlc_rounded_msat: 0 ,
245249 } ] ,
246250 nodes[ 0 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ;
247- assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose { amount_satoshis: 1_000 , transaction_fee_satoshis: 0 } ] ,
251+ assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose {
252+ amount_satoshis: 1_000 , transaction_fee_satoshis: 0 ,
253+ outbound_payment_htlc_rounded_msat: 0 ,
254+ outbound_forwarded_htlc_rounded_msat: 0 ,
255+ inbound_claiming_htlc_rounded_msat: 0 ,
256+ inbound_htlc_rounded_msat: 0 ,
257+ } ] ,
248258 nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ;
249259
250260 nodes[ 0 ] . node . close_channel ( & chan_id, & nodes[ 1 ] . node . get_our_node_id ( ) ) . unwrap ( ) ;
@@ -443,11 +453,19 @@ fn do_test_claim_value_force_close(anchors: bool, prev_commitment_tx: bool) {
443453 assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
444454 amount_satoshis: 1_000_000 - 3_000 - 4_000 - 1_000 - 3 - commitment_tx_fee - anchor_outputs_value,
445455 transaction_fee_satoshis: commitment_tx_fee,
456+ outbound_payment_htlc_rounded_msat: 3000 ,
457+ outbound_forwarded_htlc_rounded_msat: 0 ,
458+ inbound_claiming_htlc_rounded_msat: 0 ,
459+ inbound_htlc_rounded_msat: 0 ,
446460 } , sent_htlc_balance. clone( ) , sent_htlc_timeout_balance. clone( ) ] ) ,
447461 sorted_vec( nodes[ 0 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
448462 assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
449463 amount_satoshis: 1_000 ,
450464 transaction_fee_satoshis: 0 ,
465+ outbound_payment_htlc_rounded_msat: 0 ,
466+ outbound_forwarded_htlc_rounded_msat: 0 ,
467+ inbound_claiming_htlc_rounded_msat: 0 ,
468+ inbound_htlc_rounded_msat: 3000 ,
451469 } , received_htlc_balance. clone( ) , received_htlc_timeout_balance. clone( ) ] ) ,
452470 sorted_vec( nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
453471
@@ -495,6 +513,10 @@ fn do_test_claim_value_force_close(anchors: bool, prev_commitment_tx: bool) {
495513 commitment_tx_fee - // The commitment transaction fee with two HTLC outputs
496514 anchor_outputs_value, // The anchor outputs value in satoshis
497515 transaction_fee_satoshis: commitment_tx_fee,
516+ outbound_payment_htlc_rounded_msat: 3000 ,
517+ outbound_forwarded_htlc_rounded_msat: 0 ,
518+ inbound_claiming_htlc_rounded_msat: 0 ,
519+ inbound_htlc_rounded_msat: 0 ,
498520 } , sent_htlc_timeout_balance. clone( ) ] ;
499521 if !prev_commitment_tx {
500522 a_expected_balances. push ( sent_htlc_balance. clone ( ) ) ;
@@ -504,6 +526,10 @@ fn do_test_claim_value_force_close(anchors: bool, prev_commitment_tx: bool) {
504526 assert_eq ! ( vec![ Balance :: ClaimableOnChannelClose {
505527 amount_satoshis: 1_000 + 3_000 + 4_000 ,
506528 transaction_fee_satoshis: 0 ,
529+ outbound_payment_htlc_rounded_msat: 0 ,
530+ outbound_forwarded_htlc_rounded_msat: 0 ,
531+ inbound_claiming_htlc_rounded_msat: 3000 ,
532+ inbound_htlc_rounded_msat: 0 ,
507533 } ] ,
508534 nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ;
509535
@@ -987,12 +1013,20 @@ fn test_no_preimage_inbound_htlc_balances() {
9871013 assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
9881014 amount_satoshis: 1_000_000 - 500_000 - 10_000 - commitment_tx_fee,
9891015 transaction_fee_satoshis: commitment_tx_fee,
1016+ outbound_payment_htlc_rounded_msat: 0 ,
1017+ outbound_forwarded_htlc_rounded_msat: 0 ,
1018+ inbound_claiming_htlc_rounded_msat: 0 ,
1019+ inbound_htlc_rounded_msat: 0 ,
9901020 } , a_received_htlc_balance. clone( ) , a_sent_htlc_balance. clone( ) ] ) ,
9911021 sorted_vec( nodes[ 0 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
9921022
9931023 assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
9941024 amount_satoshis: 500_000 - 20_000 ,
9951025 transaction_fee_satoshis: 0 ,
1026+ outbound_payment_htlc_rounded_msat: 0 ,
1027+ outbound_forwarded_htlc_rounded_msat: 0 ,
1028+ inbound_claiming_htlc_rounded_msat: 0 ,
1029+ inbound_htlc_rounded_msat: 0 ,
9961030 } , b_received_htlc_balance. clone( ) , b_sent_htlc_balance. clone( ) ] ) ,
9971031 sorted_vec( nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
9981032
@@ -1272,6 +1306,10 @@ fn do_test_revoked_counterparty_commitment_balances(anchors: bool, confirm_htlc_
12721306 assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
12731307 amount_satoshis: 100_000 - 5_000 - 4_000 - 3 - 2_000 + 3_000 ,
12741308 transaction_fee_satoshis: 0 ,
1309+ outbound_payment_htlc_rounded_msat: 3000 ,
1310+ outbound_forwarded_htlc_rounded_msat: 0 ,
1311+ inbound_claiming_htlc_rounded_msat: 0 ,
1312+ inbound_htlc_rounded_msat: 0 ,
12751313 } , Balance :: MaybeTimeoutClaimableHTLC {
12761314 amount_satoshis: 2_000 ,
12771315 claimable_height: missing_htlc_cltv_timeout,
@@ -1826,6 +1864,10 @@ fn do_test_revoked_counterparty_aggregated_claims(anchors: bool) {
18261864 assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
18271865 amount_satoshis: 100_000 - 4_000 - 3_000 ,
18281866 transaction_fee_satoshis: 0 ,
1867+ outbound_payment_htlc_rounded_msat: 0 ,
1868+ outbound_forwarded_htlc_rounded_msat: 0 ,
1869+ inbound_claiming_htlc_rounded_msat: 0 ,
1870+ inbound_htlc_rounded_msat: 0 ,
18291871 } , Balance :: MaybeTimeoutClaimableHTLC {
18301872 amount_satoshis: 4_000 ,
18311873 claimable_height: htlc_cltv_timeout,
0 commit comments