Skip to content

Commit

Permalink
one more logic fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ebatsell committed Apr 16, 2024
1 parent 324ef3e commit 8e66b74
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions keepers/validator-keeper/src/stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,8 @@ pub async fn update_stake_history(
let validator_histories =
get_validator_history_accounts_with_retry(&client, *program_id).await?;

let validator_history_map = HashMap::from_iter(validator_histories.iter().map(|vh| {
(
Pubkey::find_program_address(
&[ValidatorHistory::SEED, &vh.vote_account.to_bytes()],
program_id,
)
.0,
vh,
)
}));
let validator_history_map =
HashMap::from_iter(validator_histories.iter().map(|vh| (vh.vote_account, vh)));
let (stake_rank_map, superminority_threshold) =
get_stake_rank_map_and_superminority_count(&vote_accounts);

Expand Down

0 comments on commit 8e66b74

Please sign in to comment.