Check that the proof of work on each blockheader matches the value in nBits.

Synopsis

Declared in <validation.h>

bool
HasValidProofOfWork(
    std::span<CBlockHeader const> headers,
    Consensus::Params const& consensusParams);

Return Value

true if every header has valid proof of work.

Parameters

Name

Description

headers

The block headers to check.

consensusParams

Consensus parameters defining the proof‐of‐work rules.

Created with MrDocs