Skip to content

Commit

Permalink
Better variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinquaXD committed Dec 1, 2023
1 parent 261b6ff commit 7efc194
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/shared/src/recent_block_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ where
}

fn get(&mut self, key: K, block: Option<u64>) -> Option<&[V]> {
let remember_key_for_updates = block.is_some();
let allow_background_udpates = block.is_some();
let block = block.or_else(|| {
self.cached_most_recently_at_block
.get(&key)
Expand All @@ -352,7 +352,7 @@ where
})
})?;
let result = self.entries.get(&(block, key.clone())).map(Vec::as_slice);
if remember_key_for_updates && result.is_some_and(|values| !values.is_empty()) {
if allow_background_udpates && result.is_some_and(|values| !values.is_empty()) {
self.recently_used.cache_set(key, ());
}
result
Expand Down

0 comments on commit 7efc194

Please sign in to comment.