Pass Epoch by value in StakeHistory::get() (#21523)

This commit is contained in:
Brooks Prumo
2021-12-01 08:57:29 -06:00
committed by GitHub
parent 3da914330d
commit cb368e6554
5 changed files with 12 additions and 13 deletions

View File

@ -2174,7 +2174,7 @@ impl Bank {
.fetch_add(validator_rewards_paid, Relaxed);
let active_stake = if let Some(stake_history_entry) =
self.stakes.read().unwrap().history().get(&prev_epoch)
self.stakes.read().unwrap().history().get(prev_epoch)
{
stake_history_entry.effective
} else {
@ -2274,7 +2274,7 @@ impl Bank {
.fetch_add(validator_rewards_paid, Relaxed);
let active_stake = if let Some(stake_history_entry) =
self.stakes.read().unwrap().history().get(&prev_epoch)
self.stakes.read().unwrap().history().get(prev_epoch)
{
stake_history_entry.effective
} else {