File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 17
17
//! [`InvoicePayer`] caches each [`Invoice`] by its `payment_hash` so that it can retry the payment
18
18
//! if it fails. It accomplishes this by implementing [`EventHandler`] which decorates a
19
19
//! 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.
21
22
//!
22
23
//! # Example
23
24
//!
@@ -243,8 +244,8 @@ where
243
244
244
245
/// Removes the [`Invoice`] cached by the given payment hash.
245
246
///
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 .
248
249
pub fn remove_cached_invoice ( & self , payment_hash : & PaymentHash ) {
249
250
self . invoice_cache . lock ( ) . unwrap ( ) . remove ( payment_hash) ;
250
251
}
You can’t perform that action at this time.
0 commit comments