@@ -3683,14 +3683,14 @@ where
3683
3683
/// [`events::Event::PaymentClaimed`] events even for payments you intend to fail, especially on
3684
3684
/// startup during which time claims that were in-progress at shutdown may be replayed.
3685
3685
pub fn fail_htlc_backwards ( & self , payment_hash : & PaymentHash ) {
3686
- self . fail_htlc_backwards_with_reason ( payment_hash, & FailureCode :: IncorrectOrUnknownPaymentDetails ) ;
3686
+ self . fail_htlc_backwards_with_reason ( payment_hash, FailureCode :: IncorrectOrUnknownPaymentDetails ) ;
3687
3687
}
3688
3688
3689
3689
/// This is a variant of [`ChannelManager::fail_htlc_backwards`] that allows you to specify the
3690
3690
/// reason for the failure.
3691
3691
///
3692
3692
/// See [`FailureCode`] for valid failure codes.
3693
- pub fn fail_htlc_backwards_with_reason ( & self , payment_hash : & PaymentHash , failure_code : & FailureCode ) {
3693
+ pub fn fail_htlc_backwards_with_reason ( & self , payment_hash : & PaymentHash , failure_code : FailureCode ) {
3694
3694
let _persistence_guard = PersistenceNotifierGuard :: notify_on_drop ( & self . total_consistency_lock , & self . persistence_notifier ) ;
3695
3695
3696
3696
let removed_source = self . claimable_payments . lock ( ) . unwrap ( ) . claimable_htlcs . remove ( payment_hash) ;
@@ -3705,14 +3705,14 @@ where
3705
3705
}
3706
3706
3707
3707
/// Gets error data to form an [`HTLCFailReason`] given a [`FailureCode`] and [`ClaimableHTLC`].
3708
- fn get_htlc_fail_reason_from_failure_code ( & self , failure_code : & FailureCode , htlc : & ClaimableHTLC ) -> HTLCFailReason {
3708
+ fn get_htlc_fail_reason_from_failure_code ( & self , failure_code : FailureCode , htlc : & ClaimableHTLC ) -> HTLCFailReason {
3709
3709
match failure_code {
3710
- FailureCode :: TemporaryNodeFailure => HTLCFailReason :: from_failure_code ( * failure_code as u16 ) ,
3711
- FailureCode :: RequiredNodeFeatureMissing => HTLCFailReason :: from_failure_code ( * failure_code as u16 ) ,
3710
+ FailureCode :: TemporaryNodeFailure => HTLCFailReason :: from_failure_code ( failure_code as u16 ) ,
3711
+ FailureCode :: RequiredNodeFeatureMissing => HTLCFailReason :: from_failure_code ( failure_code as u16 ) ,
3712
3712
FailureCode :: IncorrectOrUnknownPaymentDetails => {
3713
3713
let mut htlc_msat_height_data = htlc. value . to_be_bytes ( ) . to_vec ( ) ;
3714
3714
htlc_msat_height_data. extend_from_slice ( & self . best_block . read ( ) . unwrap ( ) . height ( ) . to_be_bytes ( ) ) ;
3715
- HTLCFailReason :: reason ( * failure_code as u16 , htlc_msat_height_data)
3715
+ HTLCFailReason :: reason ( failure_code as u16 , htlc_msat_height_data)
3716
3716
}
3717
3717
}
3718
3718
}
0 commit comments