Auto merge of #1158 - bitcartel:zc.v0.11.2.latest_1126_trycatch, r=ebfull
Extend try catch block around call to libsnark verifier As discussed in #1126. @daira Per your [comment](https://github.com/zcash/zcash/pull/1126#issuecomment-234714939): > I would like assertion errors during tests to cause a test failure (unless the test explicitly expects them). Can we split this into verify and verify_internal, where the former does the try/catch around a call to verify_internal, and the latter is called by verification unit tests? Did you mean move everything inside the extended try/catch to verify_internal, or just the call to r1cs_ppzksnark_verifier_strong_IC?
This commit is contained in:
commit
19b49de082
|
@ -139,6 +139,7 @@ public:
|
||||||
throw std::runtime_error("JoinSplit verifying key not loaded");
|
throw std::runtime_error("JoinSplit verifying key not loaded");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
r1cs_ppzksnark_proof<ppzksnark_ppT> r1cs_proof;
|
r1cs_ppzksnark_proof<ppzksnark_ppT> r1cs_proof;
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
std::string proof_str(proof.begin(), proof.end());
|
std::string proof_str(proof.begin(), proof.end());
|
||||||
|
@ -157,7 +158,6 @@ public:
|
||||||
vpub_new
|
vpub_new
|
||||||
);
|
);
|
||||||
|
|
||||||
try {
|
|
||||||
return r1cs_ppzksnark_verifier_strong_IC<ppzksnark_ppT>(*vk, witness, r1cs_proof);
|
return r1cs_ppzksnark_verifier_strong_IC<ppzksnark_ppT>(*vk, witness, r1cs_proof);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue