tracing: add inbound connection tracepoint
This commit is contained in:
1 parent
1172bc4157
commit
85b2603eec
3 files changed
+115
-1
No files matched your search
@@ -53,6 +53,7 @@
|
||||
#include <optional>
|
||||
#include <unordered_map>
|
||||
|
||||
TRACEPOINT_SEMAPHORE(net, inbound_connection);
|
||||
TRACEPOINT_SEMAPHORE(net, outbound_message);
|
||||
|
||||
/** Maximum number of block-relay-only anchor connections */
|
||||
@@ -1833,6 +1834,12 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr<Sock>&& sock,
|
||||
m_nodes.push_back(pnode);
|
||||
}
|
||||
LogDebug(BCLog::NET, "connection from %s accepted\n", addr.ToStringAddrPort());
|
||||
TRACEPOINT(net, inbound_connection,
|
||||
pnode->GetId(),
|
||||
pnode->m_addr_name.c_str(),
|
||||
pnode->ConnectionTypeAsString().c_str(),
|
||||
pnode->ConnectedThroughNetwork(),
|
||||
GetNodeCount(ConnectionDirection::In));
|
||||
|
||||
// We received a new connection, harvest entropy from the time (and our peer count)
|
||||
RandAddEvent((uint32_t)id);
|
||||
|
||||
Reference in new issue
Block a user