Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Fix test for new signature.
Browse files Browse the repository at this point in the history
  • Loading branch information
porcuquine committed Jun 26, 2020
1 parent ee4e422 commit d0214e9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/small.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
mod mimc;

use std::fs::{File, remove_file};
use std::fs::{remove_file, File};
use std::io::{BufReader, BufWriter};
use std::path::Path;

use bellperson::groth16::{create_random_proof, prepare_verifying_key, verify_proof};
use ff::Field;
use paired::bls12_381::{Bls12, Fr};
use phase21::{MPCParameters, verify_contribution};
use phase21::small::{MPCSmall, read_small_params_from_large_file, verify_contribution_small};
use rand::{SeedableRng, thread_rng};
use phase21::small::{read_small_params_from_large_file, verify_contribution_small, MPCSmall};
use phase21::{verify_contribution, MPCParameters};
use rand::{thread_rng, SeedableRng};
use rand_chacha::ChaChaRng;

use mimc::{mimc as mimc_hash, MiMCDemo, MIMC_ROUNDS};
Expand Down Expand Up @@ -203,12 +203,12 @@ fn test_small_file_io() {
let mut writer = BufWriter::with_capacity(1024 * 1024, file);
small_params.write(&mut writer).unwrap();
}

// Test small param deserialisation.
{
let file = File::open(SMALL_PATH).unwrap();
let mut reader = BufReader::with_capacity(1024 * 1024, file);
let small_read = MPCSmall::read(&mut reader).unwrap();
let small_read = MPCSmall::read(&mut reader, false).unwrap();
assert_eq!(small_read, small_params);
assert!(large_params.has_last_contrib(&small_read));
};
Expand Down

0 comments on commit d0214e9

Please sign in to comment.