Move equihash test
This commit is contained in:
@@ -3209,8 +3209,8 @@ bool CheckBlockHeader(int32_t height,CBlockIndex *pindex, const CBlockHeader& bl
|
||||
// return state.DoS(100, error("CheckBlockHeader(): block version too low"),REJECT_INVALID, "version-too-low");
|
||||
|
||||
// Check Equihash solution is valid
|
||||
if ( fCheckPOW && !CheckEquihashSolution(&blockhdr, Params()) )
|
||||
return state.DoS(100, error("CheckBlockHeader(): Equihash solution invalid"),REJECT_INVALID, "invalid-solution");
|
||||
/*if ( fCheckPOW && !CheckEquihashSolution(&blockhdr, Params()) )
|
||||
return state.DoS(100, error("CheckBlockHeader(): Equihash solution invalid"),REJECT_INVALID, "invalid-solution");*/
|
||||
|
||||
// Check proof of work matches claimed amount
|
||||
/*komodo_index2pubkey33(pubkey33,pindex,height);
|
||||
@@ -3230,7 +3230,10 @@ bool CheckBlock(int32_t height,CBlockIndex *pindex,const CBlock& block, CValidat
|
||||
// Check that the header is valid (particularly PoW). This is mostly
|
||||
// redundant with the call in AcceptBlockHeader.
|
||||
if (!CheckBlockHeader(height,pindex,block,state,fCheckPOW))
|
||||
{
|
||||
fprintf(stderr,"CheckBlockHeader error in CheckBlock\n");
|
||||
return false;
|
||||
}
|
||||
komodo_block2pubkey33(pubkey33,(CBlock *)&block);
|
||||
if ( fCheckPOW && !CheckProofOfWork(height,pubkey33,block.GetHash(), block.nBits, Params().GetConsensus()) )
|
||||
return state.DoS(50, error("CheckBlock(): proof of work failed"),REJECT_INVALID, "high-hash");
|
||||
|
||||
Reference in New Issue
Block a user