Skip to content

Commit

Permalink
Fix account data_len (#3276)
Browse files Browse the repository at this point in the history
check for zero

Co-authored-by: HaoranYi <[email protected]>
  • Loading branch information
HaoranYi and HaoranYi authored Oct 23, 2024
1 parent 84a934a commit 0e16e60
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8885,7 +8885,9 @@ impl AccountsDb {
);
accessor.check_and_get_loaded_account(|loaded_account| {
let data_len = loaded_account.data_len();
accounts_data_len_from_duplicates += data_len;
if loaded_account.lamports() > 0 {
accounts_data_len_from_duplicates += data_len;
}
num_duplicate_accounts += 1;
if let Some(lamports_to_top_off) = Self::stats_for_rent_payers(
pubkey,
Expand Down

0 comments on commit 0e16e60

Please sign in to comment.