From 65133985e44a1d4c8eb81f065481a20e69b1b97f Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Mon, 13 Feb 2023 18:40:39 -0500 Subject: [PATCH] Don't generate redundant PaymentFailed events on abandon --- lightning/src/ln/outbound_payment.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning/src/ln/outbound_payment.rs b/lightning/src/ln/outbound_payment.rs index 6f16fadcfa0..122cd0e277e 100644 --- a/lightning/src/ln/outbound_payment.rs +++ b/lightning/src/ln/outbound_payment.rs @@ -1220,7 +1220,7 @@ impl OutboundPayments { ) { let mut outbounds = self.pending_outbound_payments.lock().unwrap(); if let hash_map::Entry::Occupied(mut payment) = outbounds.entry(payment_id) { - if let Ok(()) = payment.get_mut().mark_abandoned() { + if !payment.get().abandoned() && payment.get_mut().mark_abandoned().is_ok() { if payment.get().remaining_parts() == 0 { pending_events.lock().unwrap().push(events::Event::PaymentFailed { payment_id,