From c02d9f6dd53989f41375f13a2d39270fa5d58a04 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Sat, 27 Jul 2024 19:28:21 +0200 Subject: [PATCH] doc: net_proc: reference past defect regarding invalid GETDATA types --- src/net_processing.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 1da3ec9d211..2c2b23395dc 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2426,6 +2426,9 @@ void PeerManagerImpl::ProcessGetData(CNode& pfrom, Peer& peer, const std::atomic } // else: If the first item on the queue is an unknown type, we erase it // and continue processing the queue on the next call. + // NOTE: previously we wouldn't do so and the peer sending us a malformed GETDATA could + // result in never making progress and this thread using 100% allocated CPU. See + // https://bitcoincore.org/en/2024/07/03/disclose-getdata-cpu. } peer.m_getdata_requests.erase(peer.m_getdata_requests.begin(), it);