Skip to content

Commit 6513398

Browse files
Don't generate redundant PaymentFailed events on abandon
1 parent 17ca97b commit 6513398

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/outbound_payment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ impl OutboundPayments {
12201220
) {
12211221
let mut outbounds = self.pending_outbound_payments.lock().unwrap();
12221222
if let hash_map::Entry::Occupied(mut payment) = outbounds.entry(payment_id) {
1223-
if let Ok(()) = payment.get_mut().mark_abandoned() {
1223+
if !payment.get().abandoned() && payment.get_mut().mark_abandoned().is_ok() {
12241224
if payment.get().remaining_parts() == 0 {
12251225
pending_events.lock().unwrap().push(events::Event::PaymentFailed {
12261226
payment_id,

0 commit comments

Comments
 (0)