Skip to content

Commit e339c0a

Browse files
f use failed_within_blinded_path instead and add debug_assert
1 parent f893296 commit e339c0a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/ln/outbound_payment.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::sign::{EntropySource, NodeSigner, Recipient};
1717
use crate::events::{self, PaymentFailureReason};
1818
use crate::ln::{PaymentHash, PaymentPreimage, PaymentSecret};
1919
use 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};
2121
use crate::offers::invoice::Bolt12Invoice;
2222
use crate::routing::router::{BlindedTail, InFlightHtlcs, Path, PaymentParameters, Route, RouteParameters, Router};
2323
use 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

Comments
 (0)