doc: Fix LLM nits in net_processing.cpp
What changed, and why it matters
This commit makes two tiny documentation/comment-only changes in the Bitcoin Core networking code. One adds a named argument label to a function call, and the other fixes a grammar typo in a comment. There is no change to program logic, behavior, or security.
No security action needed. This is a non-functional documentation cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff in src/net_processing.cpp is purely cosmetic: (1) m_addrman.Add() call gets a /time_penalty=/ argument name annotation, and (2) a comment is corrected from ‘Does this peer has’ to ‘Does this peer have’. No functional code is modified.
Changed components
src/net_processing.cppInspect captured patch +2 / −2
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 4d4b7c11..2109e872 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -4082,7 +4082,7 @@ void PeerManagerImpl::ProcessMessage(Peer& peer, CNode& pfrom, const std::string
LogDebug(BCLog::NET, "Received addr: %u addresses (%u processed, %u rate-limited) from peer=%d\n",
vAddr.size(), num_proc, num_rate_limit, pfrom.GetId());
- m_addrman.Add(vAddrOk, pfrom.addr, 2h);
+ m_addrman.Add(vAddrOk, pfrom.addr, /*time_penalty=*/2h);
if (vAddr.size() < 1000) peer.m_getaddr_sent = false;
// AddrFetch: Require multiple addresses to avoid disconnecting on self-announcements
@@ -5245,7 +5245,7 @@ bool PeerManagerImpl::ProcessMessages(CNode& node, std::atomic<bool>& interruptM
LOCK(peer.m_getdata_requests_mutex);
if (!peer.m_getdata_requests.empty()) fMoreWork = true;
}
- // Does this peer has an orphan ready to reconsider?
+ // Does this peer have an orphan ready to reconsider?
// (Note: we may have provided a parent for an orphan provided
// by another peer that was already processed; in that case,
// the extra work may not be noticed, possibly resulting in an
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.