Skip to content

Commit 68fe020

Browse files
committed
simplify rnd_gen
1 parent 47708cc commit 68fe020

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

g16ckt/src/gadgets/bn254/g1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ mod tests {
428428
}
429429

430430
pub fn rnd_g1(rng: &mut impl Rng) -> ark_bn254::G1Projective {
431-
ark_bn254::G1Projective::rand(rng) * rnd_fr(rng)
431+
ark_bn254::G1Projective::rand(rng)
432432
}
433433

434434
// Standardized input/output structures for G1 tests

g16ckt/src/gadgets/bn254/g2.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -454,21 +454,15 @@ impl G2Projective {
454454
mod tests {
455455
use ark_ff::UniformRand;
456456
use rand::{Rng, SeedableRng, thread_rng};
457-
use rand_chacha::ChaCha20Rng;
458457

459458
use super::*;
460459
use crate::{
461460
circuit::{CircuitBuilder, CircuitInput, EncodeInput, modes::CircuitMode},
462461
test_utils::trng,
463462
};
464463

465-
pub fn rnd_fr(rng: &mut impl Rng) -> ark_bn254::Fr {
466-
let mut prng = ChaCha20Rng::seed_from_u64(rng.r#gen());
467-
ark_bn254::Fr::rand(&mut prng)
468-
}
469-
470464
pub fn rnd_g2(rng: &mut impl Rng) -> ark_bn254::G2Projective {
471-
ark_bn254::G2Projective::rand(rng) * rnd_fr(rng)
465+
ark_bn254::G2Projective::rand(rng)
472466
}
473467

474468
// Standardized input/output structures for G2 tests

0 commit comments

Comments
 (0)