optionally compare with partitioned rewards (#32126)
This commit is contained in:
parent
2b5594a409
commit
9cf10b7aae
|
@ -3155,6 +3155,21 @@ impl Bank {
|
|||
metrics,
|
||||
);
|
||||
|
||||
// this checking of an unactivated feature can be enabled in tests or with a validator by passing `--partitioned-epoch-rewards-compare-calculation`
|
||||
if self
|
||||
.partitioned_epoch_rewards_config()
|
||||
.test_compare_partitioned_epoch_rewards
|
||||
{
|
||||
// immutable `&self` to avoid side effects
|
||||
(self as &Bank).compare_with_partitioned_rewards(
|
||||
&stake_rewards,
|
||||
&vote_account_rewards,
|
||||
rewarded_epoch,
|
||||
thread_pool,
|
||||
null_tracer(),
|
||||
);
|
||||
}
|
||||
|
||||
self.store_stake_accounts(&stake_rewards, metrics);
|
||||
let vote_rewards = self.store_vote_accounts(vote_account_rewards, metrics);
|
||||
self.update_reward_history(stake_rewards, vote_rewards);
|
||||
|
|
Loading…
Reference in New Issue