Skip to content

Commit

Permalink
chore: remove redundant preimage update on spontaneous payment
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Jun 14, 2024
1 parent 9b8dea5 commit 46e10ba
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ where
Err(e) => {
log_error!(
self.logger,
"Failed to insert payment with hash {}: {}",
"Failed to insert spontaneous payment with hash {}: {}",
hex_utils::to_string(&payment_hash.0),
e
);
Expand Down Expand Up @@ -677,9 +677,8 @@ where
);
return;
},
PaymentPurpose::SpontaneousPayment(preimage) => {
PaymentPurpose::SpontaneousPayment(_) => {
let update = PaymentDetailsUpdate {
preimage: Some(Some(preimage)),
status: Some(PaymentStatus::Succeeded),
..PaymentDetailsUpdate::new(payment_id)
};
Expand Down

0 comments on commit 46e10ba

Please sign in to comment.