don't skip rewrite when account was written IN the current slot already (#26197)

This commit is contained in:
Jeff Washington (jwash) 2022-06-24 07:28:37 -05:00 committed by GitHub
parent 8ef33a53a5
commit a36abfda28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -5357,6 +5357,7 @@ impl Bank {
let mut time_storing_accounts_us = 0;
let can_skip_rewrites = self.rc.accounts.accounts_db.skip_rewrites || just_rewrites;
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,
@ -5375,7 +5376,7 @@ impl Bank {
bank_slot,
rent_collected_info.rent_amount,
*loaded_slot,
account.rent_epoch(),
old_rent_epoch,
account,
)
{