mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-13 16:48:08 +00:00
Made sure major_version of Cryptonote header is correct.
This commit is contained in:
parent
d8329bd28b
commit
8314daee83
@ -3038,6 +3038,10 @@ static bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos,
|
||||
|
||||
static bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, const Consensus::Params& consensusParams, bool fCheckPOW = true)
|
||||
{
|
||||
if (block.cnHeader.major_version != consensusParams.GetCryptonoteMajorVersion()) {
|
||||
return state.Invalid(false, 0, "incorrect-major-version", "Cryptonote major version incorrect");
|
||||
}
|
||||
|
||||
// Check proof of work matches claimed amount
|
||||
if (fCheckPOW && !CheckProofOfWork(block.GetPoWHash(), block.nBits, consensusParams))
|
||||
return state.DoS(50, false, REJECT_INVALID, "high-hash", false, "proof of work failed");
|
||||
|
Loading…
Reference in New Issue
Block a user