From af58b81e17be85d4ebf369083dc5a3d015a0d60e Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 24 Apr 2018 22:05:50 +0300 Subject: [PATCH] More --- src/main.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 08669438e..994f774dd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3595,12 +3595,14 @@ bool CheckBlock(int32_t *futureblockp,int32_t height,CBlockIndex *pindex,const C uint8_t pubkey33[33]; // These are checks that are independent of context. - // Check that the header is valid (particularly PoW). This is mostly - // redundant with the call in AcceptBlockHeader. - if (!CheckBlockHeader(height,pindex,block,state,fCheckPOW)) + // Check that the header is valid (particularly PoW). This is mostly redundant with the call in AcceptBlockHeader. + if (!CheckBlockHeader(futureblockp,height,pindex,block,state,fCheckPOW)) { - //fprintf(stderr,"checkblockheader error PoW.%d\n",fCheckPOW); - return false; + if ( *futureblockp == 0 ) + { + LogPrintf("CheckBlock header error"); + return false; + } } if ( fCheckPOW && !CheckEquihashSolution(&block, Params()) ) return state.DoS(100, error("CheckBlockHeader(): Equihash solution invalid"),REJECT_INVALID, "invalid-solution");