mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +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:
parent
52575e96e7
commit
20515ea3f5
3 changed files with 4 additions and 4 deletions
|
|
@ -4137,7 +4137,7 @@ bool IsBlockMutated(const CBlock& block, bool check_witness_root)
|
|||
return false;
|
||||
}
|
||||
|
||||
arith_uint256 CalculateClaimedHeadersWork(const std::vector<CBlockHeader>& headers)
|
||||
arith_uint256 CalculateClaimedHeadersWork(std::span<const CBlockHeader> headers)
|
||||
{
|
||||
arith_uint256 total_work{0};
|
||||
for (const CBlockHeader& header : headers) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue