@@ -290,10 +290,10 @@ fn do_test_claim_value_force_close(prev_commitment_tx: bool) {
290
290
sorted_vec( nodes[ 0 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
291
291
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
292
292
claimable_amount_satoshis: 1_000 ,
293
- } , Balance :: MaybePreimageClaimableHTLCAwaitingTimeout {
293
+ } , Balance :: MaybePreimageClaimableHTLC {
294
294
claimable_amount_satoshis: 3_000 ,
295
295
expiry_height: htlc_cltv_timeout,
296
- } , Balance :: MaybePreimageClaimableHTLCAwaitingTimeout {
296
+ } , Balance :: MaybePreimageClaimableHTLC {
297
297
claimable_amount_satoshis: 4_000 ,
298
298
expiry_height: htlc_cltv_timeout,
299
299
} ] ) ,
@@ -755,8 +755,8 @@ fn test_balances_on_local_commitment_htlcs() {
755
755
756
756
#[ test]
757
757
fn test_no_preimage_inbound_htlc_balances ( ) {
758
- // Tests that MaybePreimageClaimableHTLCAwaitingTimeouts are generated for inbound HTLCs for
759
- // which we do not have a preimage.
758
+ // Tests that MaybePreimageClaimableHTLC are generated for inbound HTLCs for which we do not
759
+ // have a preimage.
760
760
let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
761
761
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
762
762
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
@@ -780,7 +780,7 @@ fn test_no_preimage_inbound_htlc_balances() {
780
780
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
781
781
claimable_amount_satoshis: 1_000_000 - 500_000 - 10_000 - chan_feerate *
782
782
( channel:: commitment_tx_base_weight( opt_anchors) + 2 * channel:: COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000 ,
783
- } , Balance :: MaybePreimageClaimableHTLCAwaitingTimeout {
783
+ } , Balance :: MaybePreimageClaimableHTLC {
784
784
claimable_amount_satoshis: 20_000 ,
785
785
expiry_height: htlc_cltv_timeout,
786
786
} , Balance :: MaybeClaimableHTLCAwaitingTimeout {
@@ -791,7 +791,7 @@ fn test_no_preimage_inbound_htlc_balances() {
791
791
792
792
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
793
793
claimable_amount_satoshis: 500_000 - 20_000 ,
794
- } , Balance :: MaybePreimageClaimableHTLCAwaitingTimeout {
794
+ } , Balance :: MaybePreimageClaimableHTLC {
795
795
claimable_amount_satoshis: 10_000 ,
796
796
expiry_height: htlc_cltv_timeout,
797
797
} , Balance :: MaybeClaimableHTLCAwaitingTimeout {
@@ -813,7 +813,7 @@ fn test_no_preimage_inbound_htlc_balances() {
813
813
claimable_amount_satoshis: 1_000_000 - 500_000 - 10_000 - chan_feerate *
814
814
( channel:: commitment_tx_base_weight( opt_anchors) + 2 * channel:: COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000 ,
815
815
confirmation_height: node_a_commitment_claimable,
816
- } , Balance :: MaybePreimageClaimableHTLCAwaitingTimeout {
816
+ } , Balance :: MaybePreimageClaimableHTLC {
817
817
claimable_amount_satoshis: 20_000 ,
818
818
expiry_height: htlc_cltv_timeout,
819
819
} , Balance :: MaybeClaimableHTLCAwaitingTimeout {
@@ -839,7 +839,7 @@ fn test_no_preimage_inbound_htlc_balances() {
839
839
let mut bs_pre_spend_claims = sorted_vec ( vec ! [ Balance :: ClaimableAwaitingConfirmations {
840
840
claimable_amount_satoshis: 500_000 - 20_000 ,
841
841
confirmation_height: node_b_commitment_claimable,
842
- } , Balance :: MaybePreimageClaimableHTLCAwaitingTimeout {
842
+ } , Balance :: MaybePreimageClaimableHTLC {
843
843
claimable_amount_satoshis: 10_000 ,
844
844
expiry_height: htlc_cltv_timeout,
845
845
} , Balance :: MaybeClaimableHTLCAwaitingTimeout {
@@ -897,7 +897,7 @@ fn test_no_preimage_inbound_htlc_balances() {
897
897
claimable_amount_satoshis: 1_000_000 - 500_000 - 10_000 - chan_feerate *
898
898
( channel:: commitment_tx_base_weight( opt_anchors) + 2 * channel:: COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000 ,
899
899
confirmation_height: node_a_commitment_claimable,
900
- } , Balance :: MaybePreimageClaimableHTLCAwaitingTimeout {
900
+ } , Balance :: MaybePreimageClaimableHTLC {
901
901
claimable_amount_satoshis: 20_000 ,
902
902
expiry_height: htlc_cltv_timeout,
903
903
} , Balance :: ClaimableAwaitingConfirmations {
@@ -911,7 +911,7 @@ fn test_no_preimage_inbound_htlc_balances() {
911
911
claimable_amount_satoshis: 1_000_000 - 500_000 - 10_000 - chan_feerate *
912
912
( channel:: commitment_tx_base_weight( opt_anchors) + 2 * channel:: COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000 ,
913
913
confirmation_height: node_a_commitment_claimable,
914
- } , Balance :: MaybePreimageClaimableHTLCAwaitingTimeout {
914
+ } , Balance :: MaybePreimageClaimableHTLC {
915
915
claimable_amount_satoshis: 20_000 ,
916
916
expiry_height: htlc_cltv_timeout,
917
917
} , Balance :: ClaimableAwaitingConfirmations {
@@ -952,7 +952,7 @@ fn test_no_preimage_inbound_htlc_balances() {
952
952
// was already claimed.
953
953
mine_transaction ( & nodes[ 1 ] , & bs_htlc_timeout_claim[ 0 ] ) ;
954
954
let bs_timeout_claimable_height = nodes[ 1 ] . best_block_info ( ) . 1 + ANTI_REORG_DELAY - 1 ;
955
- assert_eq ! ( sorted_vec( vec![ Balance :: MaybePreimageClaimableHTLCAwaitingTimeout {
955
+ assert_eq ! ( sorted_vec( vec![ Balance :: MaybePreimageClaimableHTLC {
956
956
claimable_amount_satoshis: 10_000 ,
957
957
expiry_height: htlc_cltv_timeout,
958
958
} , Balance :: ClaimableAwaitingConfirmations {
@@ -962,7 +962,7 @@ fn test_no_preimage_inbound_htlc_balances() {
962
962
sorted_vec( nodes[ 1 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
963
963
964
964
mine_transaction ( & nodes[ 1 ] , & as_htlc_timeout_claim[ 0 ] ) ;
965
- assert_eq ! ( sorted_vec( vec![ Balance :: MaybePreimageClaimableHTLCAwaitingTimeout {
965
+ assert_eq ! ( sorted_vec( vec![ Balance :: MaybePreimageClaimableHTLC {
966
966
claimable_amount_satoshis: 10_000 ,
967
967
expiry_height: htlc_cltv_timeout,
968
968
} , Balance :: ClaimableAwaitingConfirmations {
@@ -974,7 +974,7 @@ fn test_no_preimage_inbound_htlc_balances() {
974
974
connect_blocks ( & nodes[ 1 ] , ANTI_REORG_DELAY - 2 ) ;
975
975
expect_payment_failed ! ( nodes[ 1 ] , to_a_failed_payment_hash, true ) ;
976
976
977
- assert_eq ! ( vec![ Balance :: MaybePreimageClaimableHTLCAwaitingTimeout {
977
+ assert_eq ! ( vec![ Balance :: MaybePreimageClaimableHTLC {
978
978
claimable_amount_satoshis: 10_000 ,
979
979
expiry_height: htlc_cltv_timeout,
980
980
} ] ,
0 commit comments