CalculateNextWorkRequired

Compute the retargeted proof-of-work target after a difficulty adjustment interval.

Synopsis

Declared in <pow.h>

unsigned int
CalculateNextWorkRequired(
    CBlockIndex const* pindexLast,
    int64_t nFirstBlockTime,
    Consensus::Params const& params);

Return Value

The retargeted target in compact nBits form.

Parameters

NameDescription
pindexLastThe last block of the interval being retargeted.
nFirstBlockTimeThe timestamp of the first block in the interval.
paramsThe consensus parameters for the active chain.