Isolate verification to a ProofVerifier context object that allows verification behavior to be tuned by the caller.

This commit is contained in:
Sean Bowe
2016-11-24 00:03:12 -07:00
parent 4e3ac9b015
commit bc59f53722
12 changed files with 105 additions and 20 deletions

View File

@@ -926,8 +926,11 @@ Object AsyncRPCOperation_sendmany::perform_joinsplit(
info.vpub_new,
!this->testmode);
if (!(jsdesc.Verify(*pzcashParams, joinSplitPubKey_))) {
throw std::runtime_error("error verifying joinsplit");
{
auto verifier = libzcash::ProofVerifier::Strict();
if (!(jsdesc.Verify(*pzcashParams, verifier, joinSplitPubKey_))) {
throw std::runtime_error("error verifying joinsplit");
}
}
mtx.vjoinsplit.push_back(jsdesc);