Skip to content

Commit

Permalink
moves check for feature activation out of accounts loop (solana-labs#…
Browse files Browse the repository at this point in the history
  • Loading branch information
behzadnouri authored Jul 10, 2022
1 parent 8576832 commit 105c7e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5344,14 +5344,16 @@ 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) =
measure!(self.rent_collector.collect_from_existing_account(
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();

Expand Down

0 comments on commit 105c7e1

Please sign in to comment.