Skip to content

Commit 5dbfa5e

Browse files
committed
f - Reword docs
1 parent 079d9cb commit 5dbfa5e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lightning-invoice/src/payment.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
//! [`InvoicePayer`] caches each [`Invoice`] by its `payment_hash` so that it can retry the payment
1818
//! if it fails. It accomplishes this by implementing [`EventHandler`] which decorates a
1919
//! user-provided handler. It will intercept any [`Event::PaymentPathFailed`] events and retry the
20-
//! payment a fixed number of times before failing or succeeding as appropriate.
20+
//! failed paths for a fixed number of total attempts or until retry is no longer possible. In such
21+
//! a situation, [`InvoicePayer`] will pass along the events to the user-provided handler.
2122
//!
2223
//! # Example
2324
//!
@@ -243,8 +244,8 @@ where
243244

244245
/// Removes the [`Invoice`] cached by the given payment hash.
245246
///
246-
/// Should be called once a payment has failed or succeeded. This is taken care of when
247-
/// [`InvoicePayer`] is used as an [`EventHandler`] but can be called independently as well.
247+
/// Should be called once a payment has failed or succeeded if not using [`InvoicePayer`] as an
248+
/// [`EventHandler`]. Otherwise, calling this method is unnecessary.
248249
pub fn remove_cached_invoice(&self, payment_hash: &PaymentHash) {
249250
self.invoice_cache.lock().unwrap().remove(payment_hash);
250251
}

0 commit comments

Comments
 (0)