Test
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user