Skip to content

Commit

Permalink
fix: throw -> throw_or_abort in sol gen (#388)
Browse files Browse the repository at this point in the history
* fix: throw -> throw_or_abort in sol gen

* toggle nix build

* fix: toggle nix build

* chore: revert toggle

---------

Co-authored-by: cheethas <addaboy@gmail.com>
  • Loading branch information
Maddiaa0 and cheethas authored Apr 27, 2023
1 parent 2396c3f commit 7cfe3f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ template <typename OuterComposer> class RecursiveCircuit {
}
auto native_result = native_verifier.verify_proof(recursive_proof);
if (native_result == false) {
throw std::runtime_error("Native verification failed");
throw_or_abort("Native verification failed");
}
}

Expand Down Expand Up @@ -122,13 +122,13 @@ template <typename OuterComposer> class RecursiveCircuit {
P, circuit_output.verification_key->reference_string->get_precomputed_g2_lines(), 2);

if (inner_proof_result != barretenberg::fq12::one()) {
throw std::runtime_error("inner proof result != 1");
throw_or_abort("inner proof result != 1");
}

circuit_output.aggregation_state.add_proof_outputs_as_public_inputs();

if (outer_composer.failed()) {
throw std::runtime_error("outer composer failed");
throw_or_abort("outer composer failed");
}

return outer_composer;
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/barretenberg/solidity_helpers/proof_gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ template <typename Composer, typename Circuit> void generate_proof(std::string s
auto verifier = composer.create_ultra_with_keccak_verifier();

if (!verifier.verify_proof(proof)) {
throw std::runtime_error("Verification failed");
throw_or_abort("Verification failed");
}

std::string proof_bytes = bytes_to_hex_string(proof.proof_data);
Expand Down

0 comments on commit 7cfe3f0

Please sign in to comment.