← Watch feed
net: Remove unused `local_socket_bytes` variable in `CConnman::GetAddresses()`
What changed, and why it matters
This commit simply removes an unused local variable from a single function in Bitcoin Core's networking code. There is no functional change, no bug fix, and no security relevance.
Recommended action
No action needed. This is a benign cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff deletes one line: auto local_socket_bytes = requestor.addrBind.GetAddrBytes(); in CConnman::GetAddresses(). The variable was assigned but never read. Removing it is a code-cleanup/refactoring change with no behavioral or security impact.
Changed components
src/net.cppCConnman::GetAddresses()Inspect captured patch +0 / −1
diff --git a/src/net.cpp b/src/net.cpp
index bf5f98eb..3148c7e9 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -3539,7 +3539,6 @@ std::vector<CAddress> CConnman::GetAddressesUnsafe(size_t max_addresses, size_t
std::vector<CAddress> CConnman::GetAddresses(CNode& requestor, size_t max_addresses, size_t max_pct)
{
- auto local_socket_bytes = requestor.addrBind.GetAddrBytes();
uint64_t network_id = requestor.m_network_key;
const auto current_time = GetTime<std::chrono::microseconds>();
auto r = m_addr_response_caches.emplace(network_id, CachedAddrResponse{});
Risk score
Our methodology →Why this scored 15/100
Human-validated context
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
No validated notes yet.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.