This commit is contained in:
jl777
2018-04-18 21:49:15 +03:00
parent e4f63a3df0
commit cdb2a22f71

View File

@@ -2585,8 +2585,11 @@ 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, fCheckPOW, !fJustCheck)) //!fJustCheck, !fJustCheck))
if (!CheckBlock(pindex->nHeight,pindex,block, state, fExpensiveChecks ? verifier : disabledVerifier, fCheckPOW, !fJustCheck))
{
fprintf(stderr,"checkblock failure in connectblock\n");
return false;
}
// verify that the view's current state corresponds to the previous block
uint256 hashPrevBlock = pindex->pprev == NULL ? uint256() : pindex->pprev->GetBlockHash();
@@ -3810,7 +3813,7 @@ bool CheckBlock(int32_t height,CBlockIndex *pindex,const CBlock& block, CValidat
// redundant with the call in AcceptBlockHeader.
if (!CheckBlockHeader(height,pindex,block,state,fCheckPOW))
{
//fprintf(stderr,"checkblockheader error PoW.%d\n",fCheckPOW);
fprintf(stderr,"checkblockheader error PoW.%d\n",fCheckPOW);
return false;
}
if ( fCheckPOW && !CheckEquihashSolution(&block, Params()) )
@@ -4188,7 +4191,7 @@ bool TestBlockValidity(CValidationState &state, const CBlock& block, CBlockIndex
}
if (!ConnectBlock(block, state, &indexDummy, viewNew, true,fCheckPOW))
{
//fprintf(stderr,"TestBlockValidity failure D\n");
fprintf(stderr,"TestBlockValidity failure D\n");
return false;
}
assert(state.IsValid());