mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-29 00:08:25 +02:00
validation: Use span for CalculateClaimedHeadersWork
Makes it friendlier for potential future users of the kernel library if they do not store the headers in a std::vector, but can guarantee contiguous memory.
This commit is contained in:
@@ -408,7 +408,7 @@ bool HasValidProofOfWork(const std::vector<CBlockHeader>& headers, const Consens
|
||||
bool IsBlockMutated(const CBlock& block, bool check_witness_root);
|
||||
|
||||
/** Return the sum of the claimed work on a given set of headers. No verification of PoW is done. */
|
||||
arith_uint256 CalculateClaimedHeadersWork(const std::vector<CBlockHeader>& headers);
|
||||
arith_uint256 CalculateClaimedHeadersWork(std::span<const CBlockHeader> headers);
|
||||
|
||||
enum class VerifyDBResult {
|
||||
SUCCESS,
|
||||
|
||||
Reference in New Issue
Block a user