Only sum accounts data len from non-zero lamport accounts (#22309) (#22317)

(cherry picked from commit ab13e39518)

Co-authored-by: Brooks Prumo <brooks@solana.com>
This commit is contained in:
mergify[bot]
2022-01-06 02:43:54 +00:00
committed by GitHub
parent 687cd4779e
commit fc0c74d722

View File

@ -6708,7 +6708,9 @@ impl AccountsDb {
&self.account_indexes,
);
}
accounts_data_len += stored_account.data().len() as u64;
if !stored_account.is_zero_lamport() {
accounts_data_len += stored_account.data().len() as u64;
}
if !rent_collector.should_collect_rent(&pubkey, &stored_account, false) || {
let (_rent_due, exempt) = rent_collector.get_rent_due(&stored_account);