Skip to content
Merged
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
11 changes: 9 additions & 2 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7572,7 +7572,10 @@ impl AccountsDb {
Some((*loaded_account.pubkey(), loaded_account.loaded_hash()))
},
|accum: &DashMap<Pubkey, AccountHash>, loaded_account: LoadedAccount| {
let loaded_hash = loaded_account.loaded_hash();
let mut loaded_hash = loaded_account.loaded_hash();
if loaded_hash == AccountHash(Hash::default()) {
loaded_hash = Self::hash_account(&loaded_account, loaded_account.pubkey())
}
accum.insert(*loaded_account.pubkey(), loaded_hash);
},
);
Expand Down Expand Up @@ -7604,9 +7607,13 @@ impl AccountsDb {
|accum: &DashMap<Pubkey, (AccountHash, AccountSharedData)>,
loaded_account: LoadedAccount| {
// Storage may have duplicates so only keep the latest version for each key
let mut loaded_hash = loaded_account.loaded_hash();
Comment thread
jeffwashington marked this conversation as resolved.
if loaded_hash == AccountHash(Hash::default()) {
loaded_hash = Self::hash_account(&loaded_account, loaded_account.pubkey())
}
accum.insert(
*loaded_account.pubkey(),
(loaded_account.loaded_hash(), loaded_account.take_account()),
(loaded_hash, loaded_account.take_account()),
);
},
);
Expand Down