diff --git a/e2e_tests/scenarios/tests/common/mod.rs b/e2e_tests/scenarios/tests/common/mod.rs index 44e7851a..55219746 100644 --- a/e2e_tests/scenarios/tests/common/mod.rs +++ b/e2e_tests/scenarios/tests/common/mod.rs @@ -85,17 +85,9 @@ pub fn init_tracing_subscriber() { /// to ensure that we do not run afoul of the element numeric limit for the /// snark scalar field. pub fn generate_test_commitments(count: usize) -> Vec { - let mut commitments = vec![]; - - for _ in 0..count { - // Generate the identities using the just the last 64 bits (of 256) has so we're - // guaranteed to be less than SNARK_SCALAR_FIELD. - let commitment = Hash::from(rand::random::()); - - commitments.push(commitment); - } - - commitments + (0..count) + .map(|_| Hash::from(rand::random::())) + .collect() } pub async fn delete_identity_with_retries(