Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions accounts-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ dev-context-only-utils = [
"dep:solana-stake-program",
"dep:solana-vote-program",
"solana-account/dev-context-only-utils",
"solana-pubkey/rand",
"solana-transaction/dev-context-only-utils",
]
frozen-abi = [
Expand Down Expand Up @@ -85,7 +84,7 @@ solana-measure = { workspace = true }
solana-message = { workspace = true }
solana-metrics = { workspace = true }
solana-nohash-hasher = { workspace = true }
solana-pubkey = { workspace = true }
solana-pubkey = { workspace = true, features = ["rand"] }
solana-rayon-threadlimit = { workspace = true }
solana-rent = { workspace = true, optional = true }
solana-rent-collector = { workspace = true }
Expand Down
7 changes: 3 additions & 4 deletions accounts-db/src/accounts_cache.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
use {
ahash::RandomState as AHashRandomState,
dashmap::DashMap,
solana_account::{AccountSharedData, ReadableAccount},
solana_clock::Slot,
solana_nohash_hasher::BuildNoHashHasher,
solana_pubkey::Pubkey,
solana_pubkey::{Pubkey, PubkeyHasherBuilder},
std::{
collections::BTreeSet,
ops::Deref,
Expand All @@ -17,7 +16,7 @@ use {

#[derive(Debug)]
pub struct SlotCache {
cache: DashMap<Pubkey, Arc<CachedAccount>, AHashRandomState>,
cache: DashMap<Pubkey, Arc<CachedAccount>, PubkeyHasherBuilder>,
same_account_writes: AtomicU64,
same_account_writes_size: AtomicU64,
unique_account_writes_size: AtomicU64,
Expand Down Expand Up @@ -128,7 +127,7 @@ impl SlotCache {
}

impl Deref for SlotCache {
type Target = DashMap<Pubkey, Arc<CachedAccount>, AHashRandomState>;
type Target = DashMap<Pubkey, Arc<CachedAccount>, PubkeyHasherBuilder>;
fn deref(&self) -> &Self::Target {
&self.cache
}
Expand Down
Loading