This commit is contained in:
jl777
2018-04-24 22:05:50 +03:00
parent 3ae9dcb4c3
commit af58b81e17

View File

@@ -3595,13 +3595,15 @@ bool CheckBlock(int32_t *futureblockp,int32_t height,CBlockIndex *pindex,const C
uint8_t pubkey33[33]; uint8_t pubkey33[33];
// These are checks that are independent of context. // These are checks that are independent of context.
// Check that the header is valid (particularly PoW). This is mostly // Check that the header is valid (particularly PoW). This is mostly redundant with the call in AcceptBlockHeader.
// redundant with the call in AcceptBlockHeader. if (!CheckBlockHeader(futureblockp,height,pindex,block,state,fCheckPOW))
if (!CheckBlockHeader(height,pindex,block,state,fCheckPOW))
{ {
//fprintf(stderr,"checkblockheader error PoW.%d\n",fCheckPOW); if ( *futureblockp == 0 )
{
LogPrintf("CheckBlock header error");
return false; return false;
} }
}
if ( fCheckPOW && !CheckEquihashSolution(&block, Params()) ) if ( fCheckPOW && !CheckEquihashSolution(&block, Params()) )
return state.DoS(100, error("CheckBlockHeader(): Equihash solution invalid"),REJECT_INVALID, "invalid-solution"); return state.DoS(100, error("CheckBlockHeader(): Equihash solution invalid"),REJECT_INVALID, "invalid-solution");
komodo_block2pubkey33(pubkey33,(CBlock *)&block); komodo_block2pubkey33(pubkey33,(CBlock *)&block);