X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fchannelmonitor.rs;h=4b2e0e65e11375b55d2eae068103a31e711f94fd;hb=ae042ebedbc96aee5395716726b058047f69bbc6;hp=72f11fe25f241406ae4d2a2bc12314ea01f293a8;hpb=475719d01cc5e4aa6566442583c3067f74bbd87c;p=rust-lightning diff --git a/lightning/src/ln/channelmonitor.rs b/lightning/src/ln/channelmonitor.rs index 72f11fe2..4b2e0e65 100644 --- a/lightning/src/ln/channelmonitor.rs +++ b/lightning/src/ln/channelmonitor.rs @@ -2492,8 +2492,13 @@ impl ChannelMonitor { for ev in events { match ev { OnchainEvent::Claim { claim_request } => { - // We may remove a whole set of claim outpoints here, as these one may have been aggregated in a single tx and claimed so atomically - self.pending_claim_requests.remove(&claim_request); + // We may remove a whole set of claim outpoints here, as these one may have + // been aggregated in a single tx and claimed so atomically + if let Some(bump_material) = self.pending_claim_requests.remove(&claim_request) { + for outpoint in bump_material.per_input_material.keys() { + self.claimable_outpoints.remove(&outpoint); + } + } }, OnchainEvent::HTLCUpdate { htlc_update } => { log_trace!(self, "HTLC {} failure update has got enough confirmations to be passed upstream", log_bytes!((htlc_update.1).0));