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
}
};
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,
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