Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove metrics from prior to rent_epoch feature activation #29322

Merged
merged 1 commit into from
Dec 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 8 additions & 24 deletions runtime/src/rent_collector.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down Expand Up @@ -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)
}
}
Expand Down