p2p: ProcessHeadersMessage(): fix received_new_header

Follow-up to #25717. The commit "Utilize anti-DoS headers download
strategy" changed how this bool variable is computed, so that its value
is now the opposite of what it should be.

GitHub-Pull: #26172
Rebased-From: bdcafb9133
This commit is contained in:
Larry Ruane
2022-09-24 00:00:17 -06:00
committed by fanquake
parent c97d924880
commit 7e0bcfbfef

View File

@@ -2843,7 +2843,7 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, Peer& peer,
// If we don't have the last header, then this peer will have given us // If we don't have the last header, then this peer will have given us
// something new (if these headers are valid). // something new (if these headers are valid).
bool received_new_header{last_received_header != nullptr}; bool received_new_header{last_received_header == nullptr};
// Now process all the headers. // Now process all the headers.
BlockValidationState state; BlockValidationState state;