diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index b2f182a6365..63faa91f583 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -4381,7 +4381,7 @@ where Ok(paths) => paths, Err(()) => { self.abandon_payment_with_reason(payment_id, PaymentFailureReason::RouteNotFound); - res = Err(Bolt12PaymentError::SendingFailed(RetryableSendFailure::RouteNotFound)); + res = Err(Bolt12PaymentError::BlindedPathCreationFailed); return NotifyOption::DoPersist } }; @@ -11018,6 +11018,12 @@ where log_trace!($logger, "Failed paying invoice: {:?}", e); InvoiceError::from_string(format!("{:?}", e)) }, + #[cfg(async_payments)] + Err(Bolt12PaymentError::BlindedPathCreationFailed) => { + let err_msg = "Failed to create a blinded path back to ourselves"; + log_trace!($logger, "{}", err_msg); + InvoiceError::from_string(err_msg.to_string()) + }, Err(Bolt12PaymentError::UnexpectedInvoice) | Err(Bolt12PaymentError::DuplicateInvoice) | Ok(()) => return None, diff --git a/lightning/src/ln/outbound_payment.rs b/lightning/src/ln/outbound_payment.rs index 65563325c8f..092f1a7fc20 100644 --- a/lightning/src/ln/outbound_payment.rs +++ b/lightning/src/ln/outbound_payment.rs @@ -535,6 +535,15 @@ pub enum Bolt12PaymentError { UnknownRequiredFeatures, /// The invoice was valid for the corresponding [`PaymentId`], but sending the payment failed. SendingFailed(RetryableSendFailure), + #[cfg(async_payments)] + /// Failed to create a blinded path back to ourselves. + /// + /// We attempted to initiate payment to a [`StaticInvoice`] but failed to create a reply path for + /// our [`HeldHtlcAvailable`] message. + /// + /// [`StaticInvoice`]: crate::offers::static_invoice::StaticInvoice + /// [`HeldHtlcAvailable`]: crate::onion_message::async_payments::HeldHtlcAvailable + BlindedPathCreationFailed, } /// Indicates that we failed to send a payment probe. Further errors may be surfaced later via