@@ -17,7 +17,7 @@ use crate::sign::{EntropySource, NodeSigner, Recipient};
1717use crate :: events:: { self , PaymentFailureReason } ;
1818use crate :: ln:: { PaymentHash , PaymentPreimage , PaymentSecret } ;
1919use crate :: ln:: channelmanager:: { ChannelDetails , EventCompletionAction , HTLCSource , PaymentId } ;
20- use crate :: ln:: onion_utils:: { DecodedOnionFailure , HTLCFailReason , INVALID_ONION_BLINDING } ;
20+ use crate :: ln:: onion_utils:: { DecodedOnionFailure , HTLCFailReason } ;
2121use crate :: offers:: invoice:: Bolt12Invoice ;
2222use crate :: routing:: router:: { BlindedTail , InFlightHtlcs , Path , PaymentParameters , Route , RouteParameters , Router } ;
2323use crate :: util:: errors:: APIError ;
@@ -1653,11 +1653,11 @@ impl OutboundPayments {
16531653 // next-hop is needlessly blaming us!
16541654 payment. get_mut ( ) . insert_previously_failed_scid ( scid) ;
16551655 }
1656- if onion_error_code == Some ( INVALID_ONION_BLINDING ) {
1656+ if failed_within_blinded_path {
16571657 debug_assert ! ( short_channel_id. is_none( ) ) ;
16581658 if let Some ( bt) = & path. blinded_tail {
16591659 payment. get_mut ( ) . insert_previously_failed_blinded_path ( & bt) ;
1660- }
1660+ } else { debug_assert ! ( false ) ; }
16611661 }
16621662
16631663 if payment_is_probe || !is_retryable_now || payment_failed_permanently {
0 commit comments