This reverts commit 9959ede9ce
.
This commit is contained in:
@ -2074,6 +2074,10 @@ impl Bank {
|
|||||||
thread_pool: &ThreadPool,
|
thread_pool: &ThreadPool,
|
||||||
reward_calc_tracer: Option<impl Fn(&RewardCalculationEvent) + Send + Sync>,
|
reward_calc_tracer: Option<impl Fn(&RewardCalculationEvent) + Send + Sync>,
|
||||||
) -> DashMap<Pubkey, VoteWithStakeDelegations> {
|
) -> 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 stakes = self.stakes.read().unwrap();
|
||||||
let accounts = DashMap::with_capacity(stakes.vote_accounts().len());
|
let accounts = DashMap::with_capacity(stakes.vote_accounts().len());
|
||||||
|
|
||||||
@ -2129,9 +2133,10 @@ impl Bank {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// filter invalid delegation accounts
|
// filter invalid delegation accounts
|
||||||
if stake_account.owner() != &solana_stake_program::id()
|
if filter_stake_delegation_accounts
|
||||||
|| (fetched_vote_account_owner.is_some()
|
&& (stake_account.owner() != &solana_stake_program::id()
|
||||||
&& fetched_vote_account_owner != Some(&solana_vote_program::id()))
|
|| (fetched_vote_account_owner.is_some()
|
||||||
|
&& fetched_vote_account_owner != Some(&solana_vote_program::id())))
|
||||||
{
|
{
|
||||||
datapoint_warn!(
|
datapoint_warn!(
|
||||||
"bank-stake_delegation_accounts-invalid-account",
|
"bank-stake_delegation_accounts-invalid-account",
|
||||||
|
Reference in New Issue
Block a user