mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-29 00:45:50 +01:00
validation: Use span for ProcessNewBlockHeaders
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:
@@ -70,6 +70,7 @@
|
||||
#include <numeric>
|
||||
#include <optional>
|
||||
#include <ranges>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
@@ -4384,7 +4385,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 ChainstateManager::ProcessNewBlockHeaders(std::span<const CBlockHeader> headers, bool min_pow_checked, BlockValidationState& state, const CBlockIndex** ppindex)
|
||||
{
|
||||
AssertLockNotHeld(cs_main);
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user