diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index ff989f44135ef8..14e1d42d896abc 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -3295,6 +3295,21 @@ impl Bank { >>>>>>> c17f15a34f (Refactor epoch reward 2 (#27257)) } + fn update_reward_history( + &self, + stake_rewards: Vec, + mut vote_rewards: Vec<(Pubkey, RewardInfo)>, + ) { + let additional_reserve = stake_rewards.len() + vote_rewards.len(); + let mut rewards = self.rewards.write().unwrap(); + rewards.reserve(additional_reserve); + rewards.append(&mut vote_rewards); + stake_rewards + .into_iter() + .filter(|x| x.get_stake_reward() > 0) + .for_each(|x| rewards.push((x.stake_pubkey, x.stake_reward_info))); + } + fn update_recent_blockhashes_locked(&self, locked_blockhash_queue: &BlockhashQueue) { #[allow(deprecated)] self.update_sysvar_account(&sysvar::recent_blockhashes::id(), |account| {