File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -242,11 +242,11 @@ where
242
242
self . payer . retry_payment ( & route, payment_id) . map_err ( |e| PaymentError :: Sending ( e) )
243
243
}
244
244
245
- /// Removes the [`Invoice`] cached by the given payment hash.
245
+ /// Removes the payment cached by the given payment hash.
246
246
///
247
247
/// Should be called once a payment has failed or succeeded if not using [`InvoicePayer`] as an
248
248
/// [`EventHandler`]. Otherwise, calling this method is unnecessary.
249
- pub fn remove_cached_invoice ( & self , payment_hash : & PaymentHash ) {
249
+ pub fn remove_cached_payment ( & self , payment_hash : & PaymentHash ) {
250
250
self . payment_cache . lock ( ) . unwrap ( ) . remove ( payment_hash) ;
251
251
}
252
252
}
@@ -627,11 +627,11 @@ mod tests {
627
627
628
628
// Can repay an invoice once cleared from cache.
629
629
let payment_hash = PaymentHash ( invoice. payment_hash ( ) . clone ( ) . into_inner ( ) ) ;
630
- invoice_payer. remove_cached_invoice ( & payment_hash) ;
630
+ invoice_payer. remove_cached_payment ( & payment_hash) ;
631
631
assert ! ( invoice_payer. pay_invoice( & invoice) . is_ok( ) ) ;
632
632
633
633
// Cannot retry paying an invoice if cleared from cache.
634
- invoice_payer. remove_cached_invoice ( & payment_hash) ;
634
+ invoice_payer. remove_cached_payment ( & payment_hash) ;
635
635
let event = Event :: PaymentPathFailed {
636
636
payment_id,
637
637
payment_hash,
You can’t perform that action at this time.
0 commit comments