[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:
John Newbery
2019-04-28 15:46:35 -05:00
parent 7204c6434b
commit c428622a5b
5 changed files with 5 additions and 9 deletions

View File

@@ -1698,8 +1698,7 @@ bool static ProcessHeadersMessage(CNode *pfrom, CConnman *connman, const std::ve
}
BlockValidationState state;
CBlockHeader first_invalid_header;
if (!ProcessNewBlockHeaders(headers, state, chainparams, &pindexLast, &first_invalid_header)) {
if (!ProcessNewBlockHeaders(headers, state, chainparams, &pindexLast)) {
if (state.IsInvalid()) {
MaybePunishNodeForBlock(pfrom->GetId(), state, via_compact_block, "invalid header received");
return false;