Isolate verification to a ProofVerifier context object that allows verification behavior to be tuned by the caller.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -2707,7 +2707,10 @@ Value zc_raw_joinsplit(const json_spirit::Array& params, bool fHelp)
|
||||
vpub_old,
|
||||
vpub_new);
|
||||
|
||||
assert(jsdesc.Verify(*pzcashParams, joinSplitPubKey));
|
||||
{
|
||||
auto verifier = libzcash::ProofVerifier::Strict();
|
||||
assert(jsdesc.Verify(*pzcashParams, verifier, joinSplitPubKey));
|
||||
}
|
||||
|
||||
mtx.vjoinsplit.push_back(jsdesc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user