Skip to content

Commit

Permalink
Remove activated feature for filtering invalid stakes from rewards (#…
Browse files Browse the repository at this point in the history
…21641) (#21651)

(cherry picked from commit a1adcb2)

Co-authored-by: Justin Starry <[email protected]>
  • Loading branch information
mergify[bot] and jstarry authored Dec 7, 2021
1 parent 89d2f34 commit 8a7106b
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2167,10 +2167,6 @@ impl Bank {
thread_pool: &ThreadPool,
reward_calc_tracer: Option<impl Fn(&RewardCalculationEvent) + Send + Sync>,
) -> DashMap<Pubkey, VoteWithStakeDelegations> {
let filter_stake_delegation_accounts = self
.feature_set
.is_active(&feature_set::filter_stake_delegation_accounts::id());

let stakes = self.stakes.read().unwrap();
let accounts = DashMap::with_capacity(stakes.vote_accounts().as_ref().len());

Expand Down Expand Up @@ -2226,10 +2222,9 @@ impl Bank {
}

// filter invalid delegation accounts
if filter_stake_delegation_accounts
&& (stake_account.owner() != &solana_stake_program::id()
|| (fetched_vote_account_owner.is_some()
&& fetched_vote_account_owner != Some(&solana_vote_program::id())))
if stake_account.owner() != &solana_stake_program::id()
|| (fetched_vote_account_owner.is_some()
&& fetched_vote_account_owner != Some(&solana_vote_program::id()))
{
datapoint_warn!(
"bank-stake_delegation_accounts-invalid-account",
Expand Down

0 comments on commit 8a7106b

Please sign in to comment.