From 673e6cc92e01a9f6c9be0c40618c5790db2cd55e Mon Sep 17 00:00:00 2001 From: Alon Haramati <91828241+alonh5@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:45:59 +0300 Subject: [PATCH] Fix accumulation test. (#718) --- crates/prover/src/core/air/accumulation.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/prover/src/core/air/accumulation.rs b/crates/prover/src/core/air/accumulation.rs index a81e9341e..dad758c48 100644 --- a/crates/prover/src/core/air/accumulation.rs +++ b/crates/prover/src/core/air/accumulation.rs @@ -173,7 +173,6 @@ mod tests { // Generate a vector of random sizes with a constant seed. let mut rng = SmallRng::seed_from_u64(0); const MAX_LOG_SIZE: u32 = 10; - const MASK: u32 = P; let log_sizes = (0..100) .map(|_| rng.gen_range(4..MAX_LOG_SIZE)) .collect::>(); @@ -181,7 +180,7 @@ mod tests { // Generate random evaluations. let evaluations = log_sizes .iter() - .map(|_| M31::from_u32_unchecked(rng.gen::() & MASK)) + .map(|_| M31::from_u32_unchecked(rng.gen::() % P)) .collect::>(); let alpha = qm31!(2, 3, 4, 5); @@ -207,7 +206,6 @@ mod tests { let mut rng = SmallRng::seed_from_u64(0); const LOG_SIZE_MIN: u32 = 4; const LOG_SIZE_BOUND: u32 = 10; - const MASK: u32 = P; let mut log_sizes = (0..100) .map(|_| rng.gen_range(LOG_SIZE_MIN..LOG_SIZE_BOUND)) .collect::>(); @@ -218,7 +216,7 @@ mod tests { .iter() .map(|log_size| { (0..(1 << *log_size)) - .map(|_| M31::from_u32_unchecked(rng.gen::() & MASK)) + .map(|_| M31::from_u32_unchecked(rng.gen::() % P)) .collect::>() }) .collect::>();