mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02: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:
parent
7204c6434b
commit
c428622a5b
5 changed files with 5 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue