Skip to content

Commit

Permalink
Fix test for variable-base MSM
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratyush committed Sep 17, 2019
1 parent 91f2bb5 commit 0fa0a3f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions algebra/src/msm/variable_base.rs
Expand Up @@ -95,7 +95,9 @@ mod test {
use super::*;
use crate::curves::bls12_381::G1Projective;
use crate::fields::bls12_381::Fr;
use rand::{self, UniformRand, SeedableRng, XorShiftRng};
use rand::SeedableRng;
use rand_xorshift::XorShiftRng;
use crate::UniformRand;

fn naive_var_base_msm<G: AffineCurve>(
bases: &[G],
Expand All @@ -113,7 +115,7 @@ mod test {
fn test_with_bls12() {
const SAMPLES: usize = 1 << 10;

let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
let mut rng = XorShiftRng::seed_from_u64(234872845u64);

let v = (0..SAMPLES)
.map(|_| Fr::rand(&mut rng).into_repr())
Expand All @@ -133,7 +135,7 @@ mod test {
fn test_with_bls12_unequal_numbers() {
const SAMPLES: usize = 1 << 10;

let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
let mut rng = XorShiftRng::seed_from_u64(234872845u64);

let v = (0..SAMPLES-1)
.map(|_| Fr::rand(&mut rng).into_repr())
Expand Down

0 comments on commit 0fa0a3f

Please sign in to comment.