@@ -280,10 +280,10 @@ fn do_test_claim_value_force_close(prev_commitment_tx: bool) {
280
280
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
281
281
claimable_amount_satoshis: 1_000_000 - 3_000 - 4_000 - 1_000 - 3 - chan_feerate *
282
282
( channel:: commitment_tx_base_weight( opt_anchors) + 2 * channel:: COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000 ,
283
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
283
+ } , Balance :: MaybeTimeoutClaimableHTLC {
284
284
claimable_amount_satoshis: 3_000 ,
285
285
claimable_height: htlc_cltv_timeout,
286
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
286
+ } , Balance :: MaybeTimeoutClaimableHTLC {
287
287
claimable_amount_satoshis: 4_000 ,
288
288
claimable_height: htlc_cltv_timeout,
289
289
} ] ) ,
@@ -341,12 +341,12 @@ fn do_test_claim_value_force_close(prev_commitment_tx: bool) {
341
341
chan_feerate * ( channel:: commitment_tx_base_weight( opt_anchors) +
342
342
if prev_commitment_tx { 1 } else { 2 } *
343
343
channel:: COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000 ,
344
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
344
+ } , Balance :: MaybeTimeoutClaimableHTLC {
345
345
claimable_amount_satoshis: 4_000 ,
346
346
claimable_height: htlc_cltv_timeout,
347
347
} ] ;
348
348
if !prev_commitment_tx {
349
- a_expected_balances. push ( Balance :: MaybeClaimableHTLCAwaitingTimeout {
349
+ a_expected_balances. push ( Balance :: MaybeTimeoutClaimableHTLC {
350
350
claimable_amount_satoshis : 3_000 ,
351
351
claimable_height : htlc_cltv_timeout,
352
352
} ) ;
@@ -403,10 +403,10 @@ fn do_test_claim_value_force_close(prev_commitment_tx: bool) {
403
403
claimable_amount_satoshis: 1_000_000 - 3_000 - 4_000 - 1_000 - 3 - chan_feerate *
404
404
( channel:: commitment_tx_base_weight( opt_anchors) + 2 * channel:: COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000 ,
405
405
confirmation_height: nodes[ 0 ] . best_block_info( ) . 1 + ANTI_REORG_DELAY - 1 ,
406
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
406
+ } , Balance :: MaybeTimeoutClaimableHTLC {
407
407
claimable_amount_satoshis: 3_000 ,
408
408
claimable_height: htlc_cltv_timeout,
409
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
409
+ } , Balance :: MaybeTimeoutClaimableHTLC {
410
410
claimable_amount_satoshis: 4_000 ,
411
411
claimable_height: htlc_cltv_timeout,
412
412
} ] ) ,
@@ -434,10 +434,10 @@ fn do_test_claim_value_force_close(prev_commitment_tx: bool) {
434
434
435
435
// After ANTI_REORG_DELAY, A will consider its balance fully spendable and generate a
436
436
// `SpendableOutputs` event. However, B still has to wait for the CSV delay.
437
- assert_eq ! ( sorted_vec( vec![ Balance :: MaybeClaimableHTLCAwaitingTimeout {
437
+ assert_eq ! ( sorted_vec( vec![ Balance :: MaybeTimeoutClaimableHTLC {
438
438
claimable_amount_satoshis: 3_000 ,
439
439
claimable_height: htlc_cltv_timeout,
440
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
440
+ } , Balance :: MaybeTimeoutClaimableHTLC {
441
441
claimable_amount_satoshis: 4_000 ,
442
442
claimable_height: htlc_cltv_timeout,
443
443
} ] ) ,
@@ -465,16 +465,16 @@ fn do_test_claim_value_force_close(prev_commitment_tx: bool) {
465
465
} else {
466
466
expect_payment_sent ! ( nodes[ 0 ] , payment_preimage) ;
467
467
}
468
- assert_eq ! ( sorted_vec( vec![ Balance :: MaybeClaimableHTLCAwaitingTimeout {
468
+ assert_eq ! ( sorted_vec( vec![ Balance :: MaybeTimeoutClaimableHTLC {
469
469
claimable_amount_satoshis: 3_000 ,
470
470
claimable_height: htlc_cltv_timeout,
471
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
471
+ } , Balance :: MaybeTimeoutClaimableHTLC {
472
472
claimable_amount_satoshis: 4_000 ,
473
473
claimable_height: htlc_cltv_timeout,
474
474
} ] ) ,
475
475
sorted_vec( nodes[ 0 ] . chain_monitor. chain_monitor. get_monitor( funding_outpoint) . unwrap( ) . get_claimable_balances( ) ) ) ;
476
476
connect_blocks ( & nodes[ 0 ] , ANTI_REORG_DELAY - 1 ) ;
477
- assert_eq ! ( vec![ Balance :: MaybeClaimableHTLCAwaitingTimeout {
477
+ assert_eq ! ( vec![ Balance :: MaybeTimeoutClaimableHTLC {
478
478
claimable_amount_satoshis: 4_000 ,
479
479
claimable_height: htlc_cltv_timeout,
480
480
} ] ,
@@ -646,10 +646,10 @@ fn test_balances_on_local_commitment_htlcs() {
646
646
claimable_amount_satoshis: 1_000_000 - 10_000 - 20_000 - chan_feerate *
647
647
( channel:: commitment_tx_base_weight( opt_anchors) + 2 * channel:: COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000 ,
648
648
confirmation_height: node_a_commitment_claimable,
649
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
649
+ } , Balance :: MaybeTimeoutClaimableHTLC {
650
650
claimable_amount_satoshis: 10_000 ,
651
651
claimable_height: htlc_cltv_timeout,
652
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
652
+ } , Balance :: MaybeTimeoutClaimableHTLC {
653
653
claimable_amount_satoshis: 20_000 ,
654
654
claimable_height: htlc_cltv_timeout,
655
655
} ] ) ,
@@ -673,10 +673,10 @@ fn test_balances_on_local_commitment_htlcs() {
673
673
claimable_amount_satoshis: 1_000_000 - 10_000 - 20_000 - chan_feerate *
674
674
( channel:: commitment_tx_base_weight( opt_anchors) + 2 * channel:: COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000 ,
675
675
confirmation_height: node_a_commitment_claimable,
676
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
676
+ } , Balance :: MaybeTimeoutClaimableHTLC {
677
677
claimable_amount_satoshis: 10_000 ,
678
678
claimable_height: htlc_cltv_timeout,
679
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
679
+ } , Balance :: MaybeTimeoutClaimableHTLC {
680
680
claimable_amount_satoshis: 20_000 ,
681
681
claimable_height: htlc_cltv_timeout,
682
682
} ] ) ,
@@ -697,7 +697,7 @@ fn test_balances_on_local_commitment_htlcs() {
697
697
} , Balance :: ClaimableAwaitingConfirmations {
698
698
claimable_amount_satoshis: 10_000 ,
699
699
confirmation_height: node_a_htlc_claimable,
700
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
700
+ } , Balance :: MaybeTimeoutClaimableHTLC {
701
701
claimable_amount_satoshis: 20_000 ,
702
702
claimable_height: htlc_cltv_timeout,
703
703
} ] ) ,
@@ -714,7 +714,7 @@ fn test_balances_on_local_commitment_htlcs() {
714
714
} , Balance :: ClaimableAwaitingConfirmations {
715
715
claimable_amount_satoshis: 10_000 ,
716
716
confirmation_height: node_a_htlc_claimable,
717
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
717
+ } , Balance :: MaybeTimeoutClaimableHTLC {
718
718
claimable_amount_satoshis: 20_000 ,
719
719
claimable_height: htlc_cltv_timeout,
720
720
} ] ) ,
@@ -783,7 +783,7 @@ fn test_no_preimage_inbound_htlc_balances() {
783
783
} , Balance :: MaybePreimageClaimableHTLC {
784
784
claimable_amount_satoshis: 20_000 ,
785
785
expiry_height: htlc_cltv_timeout,
786
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
786
+ } , Balance :: MaybeTimeoutClaimableHTLC {
787
787
claimable_amount_satoshis: 10_000 ,
788
788
claimable_height: htlc_cltv_timeout,
789
789
} ] ) ,
@@ -794,7 +794,7 @@ fn test_no_preimage_inbound_htlc_balances() {
794
794
} , Balance :: MaybePreimageClaimableHTLC {
795
795
claimable_amount_satoshis: 10_000 ,
796
796
expiry_height: htlc_cltv_timeout,
797
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
797
+ } , Balance :: MaybeTimeoutClaimableHTLC {
798
798
claimable_amount_satoshis: 20_000 ,
799
799
claimable_height: htlc_cltv_timeout,
800
800
} ] ) ,
@@ -816,7 +816,7 @@ fn test_no_preimage_inbound_htlc_balances() {
816
816
} , Balance :: MaybePreimageClaimableHTLC {
817
817
claimable_amount_satoshis: 20_000 ,
818
818
expiry_height: htlc_cltv_timeout,
819
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
819
+ } , Balance :: MaybeTimeoutClaimableHTLC {
820
820
claimable_amount_satoshis: 10_000 ,
821
821
claimable_height: htlc_cltv_timeout,
822
822
} ] ) ;
@@ -842,7 +842,7 @@ fn test_no_preimage_inbound_htlc_balances() {
842
842
} , Balance :: MaybePreimageClaimableHTLC {
843
843
claimable_amount_satoshis: 10_000 ,
844
844
expiry_height: htlc_cltv_timeout,
845
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
845
+ } , Balance :: MaybeTimeoutClaimableHTLC {
846
846
claimable_amount_satoshis: 20_000 ,
847
847
claimable_height: htlc_cltv_timeout,
848
848
} ] ) ;
@@ -1089,13 +1089,13 @@ fn do_test_revoked_counterparty_commitment_balances(confirm_htlc_spend_first: bo
1089
1089
// lists the two on-chain timeout-able HTLCs as claimable balances.
1090
1090
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
1091
1091
claimable_amount_satoshis: 100_000 - 5_000 - 4_000 - 3 - 2_000 + 3_000 ,
1092
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
1092
+ } , Balance :: MaybeTimeoutClaimableHTLC {
1093
1093
claimable_amount_satoshis: 2_000 ,
1094
1094
claimable_height: missing_htlc_cltv_timeout,
1095
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
1095
+ } , Balance :: MaybeTimeoutClaimableHTLC {
1096
1096
claimable_amount_satoshis: 4_000 ,
1097
1097
claimable_height: htlc_cltv_timeout,
1098
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
1098
+ } , Balance :: MaybeTimeoutClaimableHTLC {
1099
1099
claimable_amount_satoshis: 5_000 ,
1100
1100
claimable_height: live_htlc_cltv_timeout,
1101
1101
} ] ) ,
@@ -1501,10 +1501,10 @@ fn test_revoked_counterparty_aggregated_claims() {
1501
1501
1502
1502
assert_eq ! ( sorted_vec( vec![ Balance :: ClaimableOnChannelClose {
1503
1503
claimable_amount_satoshis: 100_000 - 4_000 - 3_000 ,
1504
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
1504
+ } , Balance :: MaybeTimeoutClaimableHTLC {
1505
1505
claimable_amount_satoshis: 4_000 ,
1506
1506
claimable_height: htlc_cltv_timeout,
1507
- } , Balance :: MaybeClaimableHTLCAwaitingTimeout {
1507
+ } , Balance :: MaybeTimeoutClaimableHTLC {
1508
1508
claimable_amount_satoshis: 3_000 ,
1509
1509
claimable_height: htlc_cltv_timeout,
1510
1510
} ] ) ,
0 commit comments