Skip to content

Commit

Permalink
simplify error handling in deserialization test
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Jul 14, 2023
1 parent 7d85d26 commit 3e260b0
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions triton-vm/src/stark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1581,15 +1581,13 @@ pub(crate) mod triton_stark_tests {
&mut None,
);

let filename = "halt_error.tsp";
let result = Stark::verify(&parameters, &claim, &proof, &mut None);
if let Err(e) = result {
if let Err(e) = save_proof(filename, proof) {
panic!("Unsyntactical proof and can't save! {e}");
}
panic!("Saved proof to {filename} because verifier is unhappy! {e}");
}
assert!(result.unwrap());
let verdict = Stark::verify(&parameters, &claim, &proof, &mut None);
if let Err(_) = verdict {
let filename = "halt_error.tsp";
save_proof(filename, proof).unwrap();
eprintln!("Saved proof to {filename}.");
};
assert!(verdict.unwrap());
}
}

Expand Down

0 comments on commit 3e260b0

Please sign in to comment.