Validate RandomX proof of work when reading blocks
This commit is contained in:
parent
1f5663f19f
commit
e9e4cad8e8
3 changed files with 35 additions and 11 deletions
|
|
@ -346,6 +346,14 @@ void InitScriptExecutionCache();
|
|||
/** Context-independent validity checks */
|
||||
bool CheckBlock(const CBlock& block, BlockValidationState& state, const Consensus::Params& consensusParams, bool fCheckPOW = true, bool fCheckMerkleRoot = true);
|
||||
|
||||
/** Context-dependent RandomX proof-of-work validation. */
|
||||
bool CheckContextualRandomXProofOfWork(
|
||||
const CBlockHeader& block,
|
||||
BlockValidationState& state,
|
||||
const Consensus::Params& consensusParams,
|
||||
const CBlockIndex* pindexPrev,
|
||||
bool fCheckPOW = true);
|
||||
|
||||
/** Check a block is completely valid from start to finish (only works on top of our current best block) */
|
||||
bool TestBlockValidity(BlockValidationState& state,
|
||||
const CChainParams& chainparams,
|
||||
|
|
|
|||
Loading…
Reference in a new issue