Skip to content

Commit

Permalink
Improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
¨Jeff committed Jul 11, 2023
1 parent f8ff0ac commit c86ebd4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bandersnatch_vrfs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,12 @@ mod tests {
let kzg = ring::KZG::testing_kzg_setup([0; 32], 2u32.pow(10));
let keyset_size = kzg.max_keyset_size();

// Gen a bunch of random public keys
let mut rng = rand_core::OsRng;
let mut l = [0u8; 8];
rng.fill_bytes(&mut l);
let keyset_size = usize::from_le_bytes(l) % keyset_size;

// Gen a bunch of random public keys
let mut pks: Vec<_> = (0..keyset_size).map(|_| E::rand(&mut rng)).collect();
// Just select one index for the actual key we are for signing
let secret_key_idx = keyset_size / 2;
Expand Down

0 comments on commit c86ebd4

Please sign in to comment.