Skip to content

Commit

Permalink
Better test commitments generation.
Browse files Browse the repository at this point in the history
Co-authored-by: 0xKitsune <77890308+0xKitsune@users.noreply.github.com>
  • Loading branch information
piohei and 0xKitsune authored Jun 20, 2024
1 parent 5327b54 commit dbbd3bf
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions e2e_tests/scenarios/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Hash> {
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::<u64>());

commitments.push(commitment);
}

commitments
(0..count)
.map(|_| Hash::from(rand::random::<u64>()))
.collect()
}

pub async fn delete_identity_with_retries(
Expand Down

0 comments on commit dbbd3bf

Please sign in to comment.