MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / CalculateClaimedHeadersWork

Function CalculateClaimedHeadersWork

src/validation.cpp:4068–4075  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4066}
4067
4068arith_uint256 CalculateClaimedHeadersWork(std::span<const CBlockHeader> headers)
4069{
4070 arith_uint256 total_work{0};
4071 for (const CBlockHeader& header : headers) {
4072 total_work += GetBlockProof(header);
4073 }
4074 return total_work;
4075}
4076
4077/** Context-dependent validity checks.
4078 * By "context", we mean only the previous block headers, but not the UTXO

Callers 3

TryLowWorkHeadersSyncMethod · 0.85
headerssync.cppFile · 0.85

Calls 1

GetBlockProofFunction · 0.85

Tested by

no test coverage detected