more fmt fixes
This commit is contained in:
parent
809e2f4018
commit
2ce56e1e36
3 changed files with 9 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
use helpers::{Executable, Signed};
|
||||
use libsnark::{get_sha256round_witness};
|
||||
use libsnark::get_sha256round_witness;
|
||||
use serde_json;
|
||||
use standard;
|
||||
use std::fmt;
|
||||
|
@ -29,7 +29,7 @@ impl<T: Field> Executable<T> for LibsnarkGadgetHelper {
|
|||
if let Err(e) = witness_result {
|
||||
return Err(format!("{}", e));
|
||||
}
|
||||
|
||||
|
||||
Ok(witness_result
|
||||
.unwrap()
|
||||
.variables
|
||||
|
|
|
@ -146,14 +146,14 @@ mod tests {
|
|||
0, 0, 1, 1, 1, 1, 1, 1,
|
||||
// append SHA256 IV vector (https://en.wikipedia.org/wiki/SHA-2)
|
||||
0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0,
|
||||
0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0,
|
||||
0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0,
|
||||
1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1,
|
||||
0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1,
|
||||
0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1,
|
||||
1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1,
|
||||
0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1,
|
||||
0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
|
||||
1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1,
|
||||
0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1,
|
||||
1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1,
|
||||
0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1,
|
||||
1, 0, 0, 1,
|
||||
];
|
||||
let r = sha
|
||||
|
|
|
@ -130,7 +130,6 @@ impl Importer {
|
|||
use libsnark::get_sha256round_constraints;
|
||||
use serde_json::from_str;
|
||||
use standard::{DirectiveR1CS, R1CS};
|
||||
use std::io::BufReader;
|
||||
|
||||
match import.source.as_ref() {
|
||||
"LIBSNARK/sha256round" => {
|
||||
|
|
Loading…
Reference in a new issue