moves check for feature activation out of accounts loop (#26535)

This commit is contained in:
behzad nouri 2022-07-10 17:39:19 +00:00 committed by GitHub
parent 8576832f2a
commit 105c7e19e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -5344,6 +5344,8 @@ impl Bank {
let mut time_hashing_skipped_rewrites_us = 0;
let mut time_storing_accounts_us = 0;
let can_skip_rewrites = self.rc.accounts.accounts_db.skip_rewrites || just_rewrites;
let preserve_rent_epoch_for_rent_exempt_accounts =
self.preserve_rent_epoch_for_rent_exempt_accounts();
for (pubkey, account, loaded_slot) in accounts.iter_mut() {
let old_rent_epoch = account.rent_epoch();
let (rent_collected_info, measure) =
@ -5351,7 +5353,7 @@ impl Bank {
pubkey,
account,
self.rc.accounts.accounts_db.filler_account_suffix.as_ref(),
self.preserve_rent_epoch_for_rent_exempt_accounts(),
preserve_rent_epoch_for_rent_exempt_accounts,
));
time_collecting_rent_us += measure.as_us();