From cdb2a22f71d1c4d4891f76d8f1d6cb273b20a310 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 18 Apr 2018 21:49:15 +0300 Subject: [PATCH] Test --- src/main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3056ac11d..ee5676c62 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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());