@@ -3653,14 +3653,14 @@ where
3653
3653
/// [`events::Event::PaymentClaimed`] events even for payments you intend to fail, especially on
3654
3654
/// startup during which time claims that were in-progress at shutdown may be replayed.
3655
3655
pub fn fail_htlc_backwards ( & self , payment_hash : & PaymentHash ) {
3656
- self . fail_htlc_backwards_with_reason ( payment_hash, & FailureCode :: IncorrectOrUnknownPaymentDetails ) ;
3656
+ self . fail_htlc_backwards_with_reason ( payment_hash, FailureCode :: IncorrectOrUnknownPaymentDetails ) ;
3657
3657
}
3658
3658
3659
3659
/// This is a variant of [`ChannelManager::fail_htlc_backwards`] that allows you to specify the
3660
3660
/// reason for the failure.
3661
3661
///
3662
3662
/// See [`FailureCode`] for valid failure codes.
3663
- pub fn fail_htlc_backwards_with_reason ( & self , payment_hash : & PaymentHash , failure_code : & FailureCode ) {
3663
+ pub fn fail_htlc_backwards_with_reason ( & self , payment_hash : & PaymentHash , failure_code : FailureCode ) {
3664
3664
let _persistence_guard = PersistenceNotifierGuard :: notify_on_drop ( & self . total_consistency_lock , & self . persistence_notifier ) ;
3665
3665
3666
3666
let removed_source = self . claimable_payments . lock ( ) . unwrap ( ) . claimable_htlcs . remove ( payment_hash) ;
@@ -3675,14 +3675,14 @@ where
3675
3675
}
3676
3676
3677
3677
/// Gets error data to form an [`HTLCFailReason`] given a [`FailureCode`] and [`ClaimableHTLC`].
3678
- fn get_htlc_fail_reason_from_failure_code ( & self , failure_code : & FailureCode , htlc : & ClaimableHTLC ) -> HTLCFailReason {
3678
+ fn get_htlc_fail_reason_from_failure_code ( & self , failure_code : FailureCode , htlc : & ClaimableHTLC ) -> HTLCFailReason {
3679
3679
match failure_code {
3680
- FailureCode :: TemporaryNodeFailure => HTLCFailReason :: from_failure_code ( * failure_code as u16 ) ,
3681
- FailureCode :: RequiredNodeFeatureMissing => HTLCFailReason :: from_failure_code ( * failure_code as u16 ) ,
3680
+ FailureCode :: TemporaryNodeFailure => HTLCFailReason :: from_failure_code ( failure_code as u16 ) ,
3681
+ FailureCode :: RequiredNodeFeatureMissing => HTLCFailReason :: from_failure_code ( failure_code as u16 ) ,
3682
3682
FailureCode :: IncorrectOrUnknownPaymentDetails => {
3683
3683
let mut htlc_msat_height_data = htlc. value . to_be_bytes ( ) . to_vec ( ) ;
3684
3684
htlc_msat_height_data. extend_from_slice ( & self . best_block . read ( ) . unwrap ( ) . height ( ) . to_be_bytes ( ) ) ;
3685
- HTLCFailReason :: reason ( * failure_code as u16 , htlc_msat_height_data)
3685
+ HTLCFailReason :: reason ( failure_code as u16 , htlc_msat_height_data)
3686
3686
}
3687
3687
}
3688
3688
}
0 commit comments