Skip to content

Commit c331f58

Browse files
Don't generate redundant PaymentFailed events on abandon
1 parent bcbee25 commit c331f58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/outbound_payment.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ impl OutboundPayments {
11891189
) {
11901190
let mut outbounds = self.pending_outbound_payments.lock().unwrap();
11911191
if let hash_map::Entry::Occupied(mut payment) = outbounds.entry(payment_id) {
1192-
if let Ok(()) = payment.get_mut().mark_abandoned() {
1192+
if !payment.get().abandoned() && payment.get_mut().mark_abandoned().is_ok() {
11931193
if payment.get().remaining_parts() == 0 {
11941194
pending_events.lock().unwrap().push(events::Event::PaymentFailed {
11951195
payment_id,

0 commit comments

Comments
 (0)