Skip to content

Commit 0a9b8a1

Browse files
committed
f correct cache retention on reorg
1 parent c83cb72 commit 0a9b8a1

File tree

1 file changed

+2
-2
lines changed
  • lightning-block-sync/src

1 file changed

+2
-2
lines changed

lightning-block-sync/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl Cache for HeaderCache {
230230
}
231231

232232
fn blocks_disconnected(&mut self, fork_point: &ValidatedBlockHeader) {
233-
self.0.retain(|_, block_info| block_info.height < fork_point.height);
233+
self.0.retain(|_, block_info| block_info.height <= fork_point.height);
234234
}
235235
}
236236

@@ -244,7 +244,7 @@ impl Cache for &mut HeaderCache {
244244
}
245245

246246
fn blocks_disconnected(&mut self, fork_point: &ValidatedBlockHeader) {
247-
self.0.retain(|_, block_info| block_info.height < fork_point.height);
247+
self.0.retain(|_, block_info| block_info.height <= fork_point.height);
248248
}
249249
}
250250

0 commit comments

Comments
 (0)