diff --git a/tig-protocol/src/add_block.rs b/tig-protocol/src/add_block.rs index 570717c9..8474d22e 100644 --- a/tig-protocol/src/add_block.rs +++ b/tig-protocol/src/add_block.rs @@ -496,12 +496,13 @@ async fn update_cutoffs(block: &Block, cache: &mut AddBlockCache) { let mut num_solutions_by_player_by_challenge = HashMap::>::new(); for benchmark in cache.active_benchmarks.values() { + let num_solutions_by_player = num_solutions_by_player_by_challenge + .entry(benchmark.settings.player_id.clone()) + .or_default(); if !cutoff_challenge_ids.contains(&benchmark.settings.challenge_id) { continue; } - *num_solutions_by_player_by_challenge - .entry(benchmark.settings.player_id.clone()) - .or_default() + *num_solutions_by_player .entry(benchmark.settings.challenge_id.clone()) .or_default() += benchmark.details.num_solutions; }