CheckBlock

Context-independent validity checks.

Synopsis

Declared in <validation.h>

bool
CheckBlock(
    CBlock const& block,
    BlockValidationState& state,
    Consensus::Params const& consensusParams,
    bool fCheckPOW = true,
    bool fCheckMerkleRoot = true);

Return Value

true if the block passes the context-independent checks.

Parameters

NameDescription
blockThe block to check.
stateValidation state updated with the reason for any failure.
consensusParamsConsensus parameters to check the block against.
fCheckPOWWhether to check the proof of work.
fCheckMerkleRootWhether to check the merkle root.