@@ -301,10 +301,12 @@ fn do_test_claim_value_force_close(prev_commitment_tx: bool) {
301301 let sent_htlc_balance = Balance :: MaybeTimeoutClaimableHTLC {
302302 claimable_amount_satoshis : 3_000 ,
303303 claimable_height : htlc_cltv_timeout,
304+ payment_hash,
304305 } ;
305306 let sent_htlc_timeout_balance = Balance :: MaybeTimeoutClaimableHTLC {
306307 claimable_amount_satoshis : 4_000 ,
307308 claimable_height : htlc_cltv_timeout,
309+ payment_hash : timeout_payment_hash,
308310 } ;
309311 let received_htlc_balance = Balance :: MaybePreimageClaimableHTLC {
310312 claimable_amount_satoshis : 3_000 ,
@@ -638,10 +640,12 @@ fn test_balances_on_local_commitment_htlcs() {
638640 let htlc_balance_known_preimage = Balance :: MaybeTimeoutClaimableHTLC {
639641 claimable_amount_satoshis : 10_000 ,
640642 claimable_height : htlc_cltv_timeout,
643+ payment_hash,
641644 } ;
642645 let htlc_balance_unknown_preimage = Balance :: MaybeTimeoutClaimableHTLC {
643646 claimable_amount_satoshis : 20_000 ,
644647 claimable_height : htlc_cltv_timeout,
648+ payment_hash : payment_hash_2,
645649 } ;
646650
647651 assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableAwaitingConfirmations {
@@ -766,6 +770,7 @@ fn test_no_preimage_inbound_htlc_balances() {
766770 let a_sent_htlc_balance = Balance :: MaybeTimeoutClaimableHTLC {
767771 claimable_amount_satoshis : 10_000 ,
768772 claimable_height : htlc_cltv_timeout,
773+ payment_hash : to_b_failed_payment_hash,
769774 } ;
770775 let a_received_htlc_balance = Balance :: MaybePreimageClaimableHTLC {
771776 claimable_amount_satoshis : 20_000 ,
@@ -778,6 +783,7 @@ fn test_no_preimage_inbound_htlc_balances() {
778783 let b_sent_htlc_balance = Balance :: MaybeTimeoutClaimableHTLC {
779784 claimable_amount_satoshis : 20_000 ,
780785 claimable_height : htlc_cltv_timeout,
786+ payment_hash : to_a_failed_payment_hash,
781787 } ;
782788
783789 // Both A and B will have an HTLC that's claimable on timeout and one that's claimable if they
@@ -1068,12 +1074,15 @@ fn do_test_revoked_counterparty_commitment_balances(confirm_htlc_spend_first: bo
10681074 } , Balance :: MaybeTimeoutClaimableHTLC {
10691075 claimable_amount_satoshis: 2_000 ,
10701076 claimable_height: missing_htlc_cltv_timeout,
1077+ payment_hash: missing_htlc_payment_hash,
10711078 } , Balance :: MaybeTimeoutClaimableHTLC {
10721079 claimable_amount_satoshis: 4_000 ,
10731080 claimable_height: htlc_cltv_timeout,
1081+ payment_hash: timeout_payment_hash,
10741082 } , Balance :: MaybeTimeoutClaimableHTLC {
10751083 claimable_amount_satoshis: 5_000 ,
10761084 claimable_height: live_htlc_cltv_timeout,
1085+ payment_hash: live_payment_hash,
10771086 } ] ) ,
10781087 sorted_vec( nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
10791088
@@ -1502,9 +1511,11 @@ fn test_revoked_counterparty_aggregated_claims() {
15021511 } , Balance :: MaybeTimeoutClaimableHTLC {
15031512 claimable_amount_satoshis: 4_000 ,
15041513 claimable_height: htlc_cltv_timeout,
1514+ payment_hash: revoked_payment_hash,
15051515 } , Balance :: MaybeTimeoutClaimableHTLC {
15061516 claimable_amount_satoshis: 3_000 ,
15071517 claimable_height: htlc_cltv_timeout,
1518+ payment_hash: claimed_payment_hash,
15081519 } ] ) ,
15091520 sorted_vec( nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
15101521
0 commit comments