Skip to content

Commit aa5fdb8

Browse files
committed
Fail PendingInboundPayments after their expiry time is reached
1 parent a36dd1c commit aa5fdb8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3702,6 +3702,10 @@ where
37023702
});
37033703
!htlcs.is_empty() // Only retain this entry if htlcs has at least one entry.
37043704
});
3705+
let mut payment_secrets = self.pending_inbound_payments.lock().unwrap();
3706+
payment_secrets.retain(|_, inbound_payment| {
3707+
inbound_payment.expiry_height > height
3708+
});
37053709
}
37063710
}
37073711

0 commit comments

Comments
 (0)