simulate filler account hash calc time at delta hash (#25387)

This commit is contained in:
Jeff Washington (jwash) 2022-05-20 10:20:44 -05:00 committed by GitHub
parent 1b4e4ef548
commit 950245c29b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -6546,6 +6546,15 @@ impl AccountsDb {
});
if self.filler_accounts_enabled() {
// simulate the time we would normally spend hashing the filler accounts
// this is an over approximation but at least takes a stab at simulating what the validator would spend time doing
let _ = AccountsHash::accumulate_account_hashes(
skipped_rewrites
.iter()
.map(|(k, v)| (*k, *v))
.collect::<Vec<_>>(),
);
// filler accounts do not get their updated hash values hashed into the delta hash
skipped_rewrites.retain(|key, _| !self.is_filler_account(key));
}