mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-07 11:12: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:
@@ -1095,7 +1095,7 @@ static RPCHelpMan submitheader()
|
||||
}
|
||||
|
||||
BlockValidationState state;
|
||||
chainman.ProcessNewBlockHeaders({h}, /*min_pow_checked=*/true, state);
|
||||
chainman.ProcessNewBlockHeaders({{h}}, /*min_pow_checked=*/true, state);
|
||||
if (state.IsValid()) return UniValue::VNULL;
|
||||
if (state.IsError()) {
|
||||
throw JSONRPCError(RPC_VERIFY_ERROR, state.ToString());
|
||||
|
||||
Reference in New Issue
Block a user