accounts: Don't collect rent on newly created accounts (#26851)

This commit is contained in:
Jon Cinque 2022-08-02 16:34:34 +02:00 committed by GitHub
parent a69ee79111
commit f210182851
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1292,7 +1292,9 @@ impl Accounts {
);
if execution_status.is_ok() || is_nonce_account || is_fee_payer {
if account.rent_epoch() == INITIAL_RENT_EPOCH {
if !preserve_rent_epoch_for_rent_exempt_accounts
&& account.rent_epoch() == INITIAL_RENT_EPOCH
{
let rent = rent_collector
.collect_from_created_account(
address,