Check that the proof of work on each blockheader matches the value in nBits.
Declared in <validation.h>
bool
HasValidProofOfWork(
std::span<CBlockHeader const> headers,
Consensus::Params const& consensusParams);
true if every header has valid proof of work.
| Name | Description |
|---|---|
| headers | The block headers to check. |
| consensusParams | Consensus parameters defining the proof-of-work rules. |