break out parameters to hash_account (#691)

This commit is contained in:
Jeff Washington (jwash) 2024-04-09 17:03:37 -05:00 committed by GitHub
parent f62d79b8be
commit d9d11cda4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -7576,7 +7576,14 @@ impl AccountsDb {
|accum: &DashMap<Pubkey, AccountHash>, loaded_account: LoadedAccount| {
let mut loaded_hash = loaded_account.loaded_hash();
if loaded_hash == AccountHash(Hash::default()) {
loaded_hash = Self::hash_account(&loaded_account, loaded_account.pubkey())
loaded_hash = Self::hash_account_data(
loaded_account.lamports(),
loaded_account.owner(),
loaded_account.executable(),
loaded_account.rent_epoch(),
loaded_account.data(),
loaded_account.pubkey(),
)
}
accum.insert(*loaded_account.pubkey(), loaded_hash);
},