connect `begin_partitioned_rewards` to bank (#32152)
This commit is contained in:
parent
90812fac76
commit
d79b565c72
|
@ -1787,7 +1787,7 @@ impl Bank {
|
|||
&mut self,
|
||||
parent_epoch: Epoch,
|
||||
parent_slot: Slot,
|
||||
_parent_height: u64,
|
||||
parent_height: u64,
|
||||
reward_calc_tracer: Option<impl RewardCalcTracer>,
|
||||
) {
|
||||
let epoch = self.epoch();
|
||||
|
@ -1821,12 +1821,27 @@ impl Bank {
|
|||
// After saving a snapshot of stakes, apply stake rewards and commission
|
||||
let (_, update_rewards_with_thread_pool_time) = measure!(
|
||||
{
|
||||
if self.is_partitioned_rewards_feature_enabled()
|
||||
|| self
|
||||
.partitioned_epoch_rewards_config()
|
||||
.test_enable_partitioned_rewards
|
||||
{
|
||||
self.begin_partitioned_rewards(
|
||||
reward_calc_tracer,
|
||||
&thread_pool,
|
||||
parent_epoch,
|
||||
parent_slot,
|
||||
parent_height,
|
||||
&mut rewards_metrics,
|
||||
);
|
||||
} else {
|
||||
self.update_rewards_with_thread_pool(
|
||||
parent_epoch,
|
||||
reward_calc_tracer,
|
||||
&thread_pool,
|
||||
&mut rewards_metrics,
|
||||
)
|
||||
}
|
||||
},
|
||||
"update_rewards_with_thread_pool",
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue