remove metrics from prior to rent_epoch feature activation (#29322)

This commit is contained in:
Jeff Washington (jwash) 2022-12-19 10:18:02 -06:00 committed by GitHub
parent c657f42d77
commit 3eca364190
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 24 deletions

View File

@ -1,15 +1,12 @@
//! calculate and collect rent from Accounts
use {
log::*,
solana_sdk::{
account::{AccountSharedData, ReadableAccount, WritableAccount},
clock::Epoch,
epoch_schedule::EpochSchedule,
genesis_config::GenesisConfig,
incinerator,
pubkey::Pubkey,
rent::{Rent, RentDue},
},
use solana_sdk::{
account::{AccountSharedData, ReadableAccount, WritableAccount},
clock::Epoch,
epoch_schedule::EpochSchedule,
genesis_config::GenesisConfig,
incinerator,
pubkey::Pubkey,
rent::{Rent, RentDue},
};
#[derive(Serialize, Deserialize, Clone, PartialEq, Debug, AbiExample)]
@ -101,19 +98,6 @@ impl RentCollector {
// we know this account is not exempt
let due = self.rent.due_amount(account.data().len(), years_elapsed);
// we expect rent_epoch to always be one of: {0, self.epoch-1, self.epoch, self.epoch+1}
if account_rent_epoch != 0
&& (account_rent_epoch + 1 < self.epoch || account_rent_epoch > self.epoch + 1)
{
// this should not occur in a running validator
if due == 0 {
inc_new_counter_info!("rent-collector-rent-epoch-range-large-exempt", 1);
} else {
inc_new_counter_info!("rent-collector-rent-epoch-range-large-paying", 1);
}
}
RentDue::Paying(due)
}
}