Skip to content

Commit

Permalink
DEBUG.
Browse files Browse the repository at this point in the history
  • Loading branch information
FiveMovesAhead committed Jun 19, 2024
1 parent 2ac6179 commit c8bc816
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tig-protocol/src/add_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,12 @@ async fn update_solution_signature_thresholds<T: Context>(ctx: &mut T, block: &B
.fold(0, |acc, v| acc + *v) as f64
/ num_challenges)
.ceil();
println!(
"player_id: {:?}, player_avg_qualifiers: {:?}, num_qualifiers_by_challenge: {:?}",
player.id,
player_avg_qualifiers,
player.block_data().num_qualifiers_by_challenge()
);
solutions_rate_multiplier_by_player.insert(
player.id.clone(),
player
Expand All @@ -468,7 +474,7 @@ async fn update_solution_signature_thresholds<T: Context>(ctx: &mut T, block: &B
if *v == 0 {
1.0
} else {
(player_avg_qualifiers / *v as f64).max(1.0)
(player_avg_qualifiers / (*v as f64)).min(1.0)
},
)
})
Expand Down

0 comments on commit c8bc816

Please sign in to comment.