mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
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:
@ -27,7 +27,7 @@ impl LocalBlocksCache {
|
||||
}
|
||||
|
||||
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> {
|
||||
|
||||
Reference in New Issue
Block a user