-
Notifications
You must be signed in to change notification settings - Fork 418
Closed
Description
Currently, only PaymentFailure::PartialFailure
carry PaymentParameters
, which is why InvoicePayer
retries any PaymentFailure::AllFailedResendSafe
s with empty previously_failed_channels
:
rust-lightning/lightning-invoice/src/payment.rs
Lines 524 to 533 in 98417a1
PaymentSendFailure::AllFailedResendSafe(_) => { | |
let mut payment_cache = self.payment_cache.lock().unwrap(); | |
let payment_attempts = payment_cache.get_mut(&payment_hash).unwrap(); | |
payment_attempts.count += 1; | |
if self.retry.is_retryable_now(payment_attempts) { | |
core::mem::drop(payment_cache); | |
Ok(self.pay_internal(params, payment_hash, send_payment)?) | |
} else { | |
Err(e) | |
} |
As this may result in a loop where a failing route is retried over and over again until we run out of time or attempts, we probably want to consider any previously failed channels in the AllFailedResendSafe
case also.
As InvoicePayer
is pending deprecation anyways, this probably should be fixed as part of the migration of the retry logic to ChannelManager
.
Metadata
Metadata
Assignees
Labels
No labels