@@ -16,7 +16,7 @@ use crate::liquidity::LiquiditySource;
1616use crate :: logger:: { log_error, log_info, LdkLogger , Logger } ;
1717use crate :: payment:: store:: {
1818 LSPFeeLimits , PaymentDetails , PaymentDetailsUpdate , PaymentDirection , PaymentKind ,
19- PaymentStatus , PaymentStore ,
19+ PaymentStatus , PaymentStore , PaymentStoreUpdateResult ,
2020} ;
2121use crate :: payment:: SendingParameters ;
2222use crate :: peer_store:: { PeerInfo , PeerStore } ;
@@ -394,8 +394,8 @@ impl Bolt11Payment {
394394 /// failed back, e.g., if the correct preimage can't be retrieved in time before the claim
395395 /// deadline has been reached.
396396 ///
397- /// Will check that the payment is known and pending before failing the payment, and will
398- /// return an error otherwise.
397+ /// Will check that the payment is known before failing the payment, and will return an error
398+ /// otherwise.
399399 ///
400400 /// [`receive_for_hash`]: Self::receive_for_hash
401401 /// [`receive_variable_amount_for_hash`]: Self::receive_variable_amount_for_hash
@@ -409,8 +409,9 @@ impl Bolt11Payment {
409409 } ;
410410
411411 match self . payment_store . update ( & update) {
412- Ok ( true ) => ( ) ,
413- Ok ( false ) => {
412+ Ok ( PaymentStoreUpdateResult :: EntryUpdated )
413+ | Ok ( PaymentStoreUpdateResult :: EntryUnchanged ) => ( ) ,
414+ Ok ( PaymentStoreUpdateResult :: EntryNotFound ) => {
414415 log_error ! (
415416 self . logger,
416417 "Failed to manually fail unknown payment with hash {}" ,
@@ -421,7 +422,7 @@ impl Bolt11Payment {
421422 Err ( e) => {
422423 log_error ! (
423424 self . logger,
424- "Failed to manually fail unknown payment with hash {}: {}" ,
425+ "Failed to manually fail payment with hash {}: {}" ,
425426 payment_hash,
426427 e
427428 ) ;
0 commit comments