|
|
@ -2447,7 +2447,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin |
|
|
|
auto disabledVerifier = libzcash::ProofVerifier::Disabled(); |
|
|
|
|
|
|
|
// Check it again to verify JoinSplit proofs, and in case a previous version let a bad block in
|
|
|
|
if (!CheckBlock(pindex->nHeight,pindex,block, state, fExpensiveChecks ? verifier : disabledVerifier, !fJustCheck, !fJustCheck)) |
|
|
|
if (!CheckBlock(pindex->nHeight,pindex,block, state, fExpensiveChecks ? verifier : disabledVerifier, 1, !fJustCheck)) //!fJustCheck, !fJustCheck))
|
|
|
|
return false; |
|
|
|
|
|
|
|
// verify that the view's current state corresponds to the previous block
|
|
|
@ -3912,7 +3912,7 @@ bool ProcessNewBlock(int32_t height,CValidationState &state, CNode* pfrom, CBloc |
|
|
|
LOCK(cs_main); |
|
|
|
bool fRequested = MarkBlockAsReceived(pblock->GetHash()); |
|
|
|
fRequested |= fForceProcessing; |
|
|
|
if (!checked && 0) // bypass test
|
|
|
|
if (!checked) |
|
|
|
{ |
|
|
|
if ( pfrom != 0 ) |
|
|
|
{ |
|
|
@ -4365,7 +4365,7 @@ bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth |
|
|
|
if (!ReadBlockFromDisk(block, pindex)) |
|
|
|
return error("VerifyDB(): *** ReadBlockFromDisk failed at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString()); |
|
|
|
// check level 1: verify block validity
|
|
|
|
if (nCheckLevel >= 1 && !CheckBlock(pindex->nHeight,pindex,block, state, verifier)) |
|
|
|
if (nCheckLevel >= 1 && !CheckBlock(pindex->nHeight,pindex,block, state, verifier,0)) |
|
|
|
return error("VerifyDB(): *** found bad block at %d, hash=%s\n", pindex->nHeight, pindex->GetBlockHash().ToString()); |
|
|
|
// check level 2: verify undo validity
|
|
|
|
if (nCheckLevel >= 2 && pindex) { |
|
|
|