Skip to content

Commit bdcafb9

Browse files
committed
p2p: ProcessHeadersMessage(): fix received_new_header
Follow-up to bitcoin#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.
1 parent 100949a commit bdcafb9

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
@@ -2846,7 +2846,7 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, Peer& peer,
28462846

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

28512851
// Now process all the headers.
28522852
BlockValidationState state;

0 commit comments

Comments
 (0)