Skip to content

Commit 7e0bcfb

Browse files
LarryRuanefanquake
authored andcommitted
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: bdcafb9
1 parent c97d924 commit 7e0bcfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net_processing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2843,7 +2843,7 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, Peer& peer,
28432843

28442844
// If we don't have the last header, then this peer will have given us
28452845
// something new (if these headers are valid).
2846-
bool received_new_header{last_received_header != nullptr};
2846+
bool received_new_header{last_received_header == nullptr};
28472847

28482848
// Now process all the headers.
28492849
BlockValidationState state;

0 commit comments

Comments
 (0)