mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-13 14:14:00 +01:00
tracing: add inbound connection tracepoint
This commit is contained in:
@@ -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