Skip to content

Commit

Permalink
use ahash random state
Browse files Browse the repository at this point in the history
  • Loading branch information
bw-solana committed Nov 26, 2024
1 parent be43c50 commit c3de6f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions accounts-db/src/blockhash_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub struct BlockhashQueue {
/// last hash to be registered
last_hash: Option<Hash>,

hashes: HashMap<Hash, HashInfo>,
hashes: HashMap<Hash, HashInfo, ahash::RandomState>,

/// hashes older than `max_age` will be dropped from the queue
max_age: usize,
Expand All @@ -51,7 +51,7 @@ impl Default for BlockhashQueue {
impl BlockhashQueue {
pub fn new(max_age: usize) -> Self {
Self {
hashes: HashMap::new(),
hashes: HashMap::with_hasher(ahash::RandomState::new()),
last_hash_index: 0,
last_hash: None,
max_age,
Expand Down

0 comments on commit c3de6f3

Please sign in to comment.