fix: Utillize LruMap better

LruMap was introduced to allow getting the same block twice, so removing the item when getting the block doesn't make sense.
This commit is contained in:
sprites0
2025-10-05 11:26:03 +00:00
parent 0fd4b7943f
commit b8bae7cde9

View File

@ -27,7 +27,7 @@ impl LocalBlocksCache {
} }
pub fn get_block(&mut self, height: u64) -> Option<BlockAndReceipts> { pub fn get_block(&mut self, height: u64) -> Option<BlockAndReceipts> {
self.cache.remove(&height) self.cache.get(&height).cloned()
} }
pub fn get_path_for_height(&self, height: u64) -> Option<PathBuf> { pub fn get_path_for_height(&self, height: u64) -> Option<PathBuf> {