Merge d4b5553849 into merged_master (Bitcoin PR bitcoin/bitcoin#30742)

This commit is contained in:
ivanlele 2026-03-24 14:10:04 +00:00
commit b28b274b1b
No known key found for this signature in database
9 changed files with 19 additions and 16 deletions

View file

@ -77,6 +77,7 @@
#include <numeric>
#include <optional>
#include <ranges>
#include <span>
#include <string>
#include <tuple>
#include <utility>
@ -4715,7 +4716,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) {
@ -4990,7 +4991,7 @@ bool ChainstateManager::AcceptBlockHeader(const CBlockHeader& block, BlockValida
}
// Exposed wrapper for AcceptBlockHeader
bool ChainstateManager::ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, bool min_pow_checked, BlockValidationState& state, const CBlockIndex** ppindex, bool* all_duplicate)
bool ChainstateManager::ProcessNewBlockHeaders(std::span<const CBlockHeader> headers, bool min_pow_checked, BlockValidationState& state, const CBlockIndex** ppindex, bool* all_duplicate)
{
AssertLockNotHeld(cs_main);
{