net: extend log message to include attempted connection type
What changed, and why it matters
This commit simply adds extra information to a debug log message. When Bitcoin Core tries to connect to another node, it now records what kind of connection it is attempting (for example, outbound, inbound, or manual) alongside the existing transport version and address details. There is no change to network behavior, permissions, or security logic.
No security action needed. Treat as a routine observability/logging improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change modifies a single LogDebug() call in CConnman::ConnectNode() in src/net.cpp. It adds ConnectionTypeAsString(conn_type) to the format string so the debug log includes the attempted connection type. The log remains at BCLog::NET debug level and does not alter connection handling, validation, or access control.
Changed components
src/net.cpp logging in CConnman::ConnectNode()Inspect captured patch +2 / −1
diff --git a/src/net.cpp b/src/net.cpp
index fa8929db..87df83aa 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -390,8 +390,9 @@ CNode* CConnman::ConnectNode(CAddress addrConnect,
}
}
- LogDebug(BCLog::NET, "trying %s connection %s lastseen=%.1fhrs\n",
+ LogDebug(BCLog::NET, "trying %s connection (%s) to %s, lastseen=%.1fhrs\n",
use_v2transport ? "v2" : "v1",
+ ConnectionTypeAsString(conn_type),
pszDest ? pszDest : addrConnect.ToStringAddrPort(),
Ticks<HoursDouble>(pszDest ? 0h : Now<NodeSeconds>() - addrConnect.nTime));
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.