Add lamports_in_rent_paying_accounts to TotalAccountsStats (#21368)

This commit is contained in:
Brooks Prumo 2021-11-19 17:02:23 -06:00 committed by GitHub
parent 4530a5980e
commit 0bb059185c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -6376,6 +6376,7 @@ impl Bank {
total_accounts_stats.num_rent_exempt_accounts += 1;
} else {
total_accounts_stats.num_rent_paying_accounts += 1;
total_accounts_stats.lamports_in_rent_paying_accounts += account.lamports();
if data_len == 0 {
total_accounts_stats.num_rent_paying_accounts_without_data += 1;
}
@ -6405,6 +6406,8 @@ pub struct TotalAccountsStats {
pub num_rent_paying_accounts: usize,
/// Total number of rent paying accounts without data
pub num_rent_paying_accounts_without_data: usize,
/// Total amount of lamports in rent paying accounts
pub lamports_in_rent_paying_accounts: u64,
}
impl Drop for Bank {