CheckProofOfWork

Check whether a block hash satisfies the proof-of-work requirement specified by nBits

Synopsis

Declared in <pow.h>

bool
CheckProofOfWork(
    uint256 hash,
    unsigned int nBits,
    Consensus::Params const& params);

Return Value

true if the hash meets the target specified by nBits.

Parameters

NameDescription
hashThe block hash to check.
nBitsThe proof-of-work requirement in compact target form.
paramsThe consensus parameters for the active chain.