@@ -301,10 +301,12 @@ fn do_test_claim_value_force_close(prev_commitment_tx: bool) {
301
301
let sent_htlc_balance = Balance :: MaybeTimeoutClaimableHTLC {
302
302
claimable_amount_satoshis : 3_000 ,
303
303
claimable_height : htlc_cltv_timeout,
304
+ payment_hash,
304
305
} ;
305
306
let sent_htlc_timeout_balance = Balance :: MaybeTimeoutClaimableHTLC {
306
307
claimable_amount_satoshis : 4_000 ,
307
308
claimable_height : htlc_cltv_timeout,
309
+ payment_hash : timeout_payment_hash,
308
310
} ;
309
311
let received_htlc_balance = Balance :: MaybePreimageClaimableHTLC {
310
312
claimable_amount_satoshis : 3_000 ,
@@ -638,10 +640,12 @@ fn test_balances_on_local_commitment_htlcs() {
638
640
let htlc_balance_known_preimage = Balance :: MaybeTimeoutClaimableHTLC {
639
641
claimable_amount_satoshis : 10_000 ,
640
642
claimable_height : htlc_cltv_timeout,
643
+ payment_hash,
641
644
} ;
642
645
let htlc_balance_unknown_preimage = Balance :: MaybeTimeoutClaimableHTLC {
643
646
claimable_amount_satoshis : 20_000 ,
644
647
claimable_height : htlc_cltv_timeout,
648
+ payment_hash : payment_hash_2,
645
649
} ;
646
650
647
651
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableAwaitingConfirmations {
@@ -766,6 +770,7 @@ fn test_no_preimage_inbound_htlc_balances() {
766
770
let a_sent_htlc_balance = Balance :: MaybeTimeoutClaimableHTLC {
767
771
claimable_amount_satoshis : 10_000 ,
768
772
claimable_height : htlc_cltv_timeout,
773
+ payment_hash : to_b_failed_payment_hash,
769
774
} ;
770
775
let a_received_htlc_balance = Balance :: MaybePreimageClaimableHTLC {
771
776
claimable_amount_satoshis : 20_000 ,
@@ -778,6 +783,7 @@ fn test_no_preimage_inbound_htlc_balances() {
778
783
let b_sent_htlc_balance = Balance :: MaybeTimeoutClaimableHTLC {
779
784
claimable_amount_satoshis : 20_000 ,
780
785
claimable_height : htlc_cltv_timeout,
786
+ payment_hash : to_a_failed_payment_hash,
781
787
} ;
782
788
783
789
// 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
1068
1074
} , Balance :: MaybeTimeoutClaimableHTLC {
1069
1075
claimable_amount_satoshis: 2_000 ,
1070
1076
claimable_height: missing_htlc_cltv_timeout,
1077
+ payment_hash: missing_htlc_payment_hash,
1071
1078
} , Balance :: MaybeTimeoutClaimableHTLC {
1072
1079
claimable_amount_satoshis: 4_000 ,
1073
1080
claimable_height: htlc_cltv_timeout,
1081
+ payment_hash: timeout_payment_hash,
1074
1082
} , Balance :: MaybeTimeoutClaimableHTLC {
1075
1083
claimable_amount_satoshis: 5_000 ,
1076
1084
claimable_height: live_htlc_cltv_timeout,
1085
+ payment_hash: live_payment_hash,
1077
1086
} ] ) ,
1078
1087
sorted_vec( nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
1079
1088
@@ -1502,9 +1511,11 @@ fn test_revoked_counterparty_aggregated_claims() {
1502
1511
} , Balance :: MaybeTimeoutClaimableHTLC {
1503
1512
claimable_amount_satoshis: 4_000 ,
1504
1513
claimable_height: htlc_cltv_timeout,
1514
+ payment_hash: revoked_payment_hash,
1505
1515
} , Balance :: MaybeTimeoutClaimableHTLC {
1506
1516
claimable_amount_satoshis: 3_000 ,
1507
1517
claimable_height: htlc_cltv_timeout,
1518
+ payment_hash: claimed_payment_hash,
1508
1519
} ] ) ,
1509
1520
sorted_vec( nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
1510
1521
0 commit comments