Skip to content

Commit 2d7b5a2

Browse files
committed
f Improve comment in PaymentClaimed handling
1 parent 3711ed1 commit 2d7b5a2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/event.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ where
859859
let payment_id = PaymentId(payment_hash.0);
860860
log_info!(
861861
self.logger,
862-
"Claiming payment with ID {} from payment hash {} of {}msat.",
862+
"Claimed payment with ID {} from payment hash {} of {}msat.",
863863
payment_id,
864864
hex_utils::to_string(&payment_hash.0),
865865
amount_msat,
@@ -907,14 +907,16 @@ where
907907

908908
match self.payment_store.update(&update) {
909909
Ok(PaymentStoreUpdateResult::EntryUpdated)
910-
| Ok(PaymentStoreUpdateResult::EntryUnchanged) => (),
910+
| Ok(PaymentStoreUpdateResult::EntryUnchanged) => (
911+
// No need to do anything if the idempotent update was applied, which might
912+
// be the result of a replayed event.
913+
),
911914
Ok(PaymentStoreUpdateResult::EntryNotFound) => {
912915
log_error!(
913916
self.logger,
914-
"Failed to claim payment as ID {} couldn't be found in store",
917+
"Claimed payment with ID {} couldn't be found in store",
915918
payment_id,
916919
);
917-
return Ok(());
918920
},
919921
Err(e) => {
920922
log_error!(

0 commit comments

Comments
 (0)