You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
runtime: Collect stake delegations only once during epoch activation
Processing new epoch (`Bank::process_new_epoch`) involves collecting
stake delegations twice:
1) In `Bank::compute_new_epoch_caches_and_rewards`, to create a stake
history entry and refresh vote accounts.
2) In `Bank::get_epoch_reward_calculate_param_info`, which is then used
in `Bank::calculate_stake_vote_rewards` to calculate rewards for
stakers and voters.
Reduce that to just one collect by passing the vector 1) with freshly
computed stake history and vote accounts to `Bank::begin_partitioned_rewards`.
This way, we can avoid calling `Bank::get_epoch_reward_calculate_param_info`.
0 commit comments