From: Matt Corallo Date: Fri, 23 Apr 2021 23:56:58 +0000 (+0000) Subject: Fail PendingInboundPayments after their expiry time is reached X-Git-Tag: v0.0.14~12^2~2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=f9a6cb2a8b831da36ba8e29d26ce1fceb122d9c0;p=rust-lightning Fail PendingInboundPayments after their expiry time is reached --- diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index f147a8162..ea3c2be91 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -451,7 +451,7 @@ pub struct ChannelManager>, @@ -3601,6 +3601,10 @@ where } max_time!(self.last_node_announcement_serial); max_time!(self.highest_seen_timestamp); + let mut payment_secrets = self.pending_inbound_payments.lock().unwrap(); + payment_secrets.retain(|_, inbound_payment| { + inbound_payment.expiry_time > header.time as u64 + }); } fn get_relevant_txids(&self) -> Vec {