From 7e0bcfbfef61cb688bc92a96003c1219cad67935 Mon Sep 17 00:00:00 2001 From: Larry Ruane Date: Sat, 24 Sep 2022 00:00:17 -0600 Subject: 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: bdcafb913398f0cdaff9c880618f9ebfc85c7693 --- src/net_processing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net_processing.cpp') diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 74700580ad..1c44ec9903 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -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 // 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. BlockValidationState state; -- cgit v1.2.3