Skip to content

Commit

Permalink
Only sum accounts data len from non-zero lamport accounts (#22309) (#…
Browse files Browse the repository at this point in the history
…22317)

(cherry picked from commit ab13e39)

Co-authored-by: Brooks Prumo <brooks@solana.com>
  • Loading branch information
mergify[bot] and brooksprumo committed Jan 6, 2022
1 parent 687cd47 commit fc0c74d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fc0c74d

Please sign in to comment.