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

@ -2221,7 +2221,7 @@ mod tests {
}
for epoch in 0..=stake.deactivation_epoch + 1 {
let history = stake_history.get(&epoch).unwrap();
let history = stake_history.get(epoch).unwrap();
let other_activations: u64 = other_activations[..=epoch as usize].iter().sum();
let expected_stake = history.effective - base_stake - other_activations;
let (expected_activating, expected_deactivating) = if epoch < stake.deactivation_epoch {