mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-28 00:16:04 +01:00
[validation] Remove unused first_invalid parameter from ProcessNewBlockHeaders()
No callers use the returned value in first_invalid. Remove it from the function signature and don't set it in the function.
This commit is contained in:
@@ -3619,9 +3619,8 @@ bool BlockManager::AcceptBlockHeader(const CBlockHeader& block, BlockValidationS
|
||||
}
|
||||
|
||||
// Exposed wrapper for AcceptBlockHeader
|
||||
bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, BlockValidationState& state, const CChainParams& chainparams, const CBlockIndex** ppindex, CBlockHeader *first_invalid)
|
||||
bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, BlockValidationState& state, const CChainParams& chainparams, const CBlockIndex** ppindex)
|
||||
{
|
||||
if (first_invalid != nullptr) first_invalid->SetNull();
|
||||
{
|
||||
LOCK(cs_main);
|
||||
for (const CBlockHeader& header : headers) {
|
||||
@@ -3630,7 +3629,6 @@ bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, BlockValid
|
||||
::ChainstateActive().CheckBlockIndex(chainparams.GetConsensus());
|
||||
|
||||
if (!accepted) {
|
||||
if (first_invalid) *first_invalid = header;
|
||||
return false;
|
||||
}
|
||||
if (ppindex) {
|
||||
|
||||
Reference in New Issue
Block a user