From b4b6a0705efcba006815bbec2011bbd349c71a0b Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Tue, 3 Dec 2024 10:06:38 +0200 Subject: [PATCH] net_processing: fix for merge of bitcoin/bitcoin#25717 where have_headers_sync was unused --- src/net_processing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 5648dbf227..96d452512e 100755 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2895,7 +2895,7 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, Peer& peer, // headers at this point. Our logic is slightly more complex, to work around an apparent // bug in the Bitcoin Core state machine, where we can end up downloading headers from /// lots of peers at the same time by accident. - if (nCount == MAX_HEADERS_RESULTS) { + if (nCount == MAX_HEADERS_RESULTS && !have_headers_sync) { LOCK(cs_main); CNodeState *nodestate = State(pfrom.GetId());