aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2019-04-28 15:46:35 -0500
committerJohn Newbery <john@johnnewbery.com>2019-10-29 15:46:45 -0400
commitc428622a5bb1e37b2e6ab2c52791ac05d9271238 (patch)
treefeca28c33aad7af0d295c76d906af7944050c41f /src/validation.cpp
parent7204c6434b944f6ad51b3c895837729d3aa56eea (diff)
[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.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 21f7f9c8db..eaf1cfe23d 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -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) {