diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 74700580ad7..1c44ec9903d 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;