mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-16 02:24:58 +01:00
tracing: add misbehaving conn tracepoint
This commit is contained in:
@@ -58,6 +58,7 @@
|
||||
using namespace util::hex_literals;
|
||||
|
||||
TRACEPOINT_SEMAPHORE(net, inbound_message);
|
||||
TRACEPOINT_SEMAPHORE(net, misbehaving_connection);
|
||||
|
||||
/** Headers download timeout.
|
||||
* Timeout = base + per_header * (expected number of headers) */
|
||||
@@ -1752,6 +1753,10 @@ void PeerManagerImpl::Misbehaving(Peer& peer, const std::string& message)
|
||||
const std::string message_prefixed = message.empty() ? "" : (": " + message);
|
||||
peer.m_should_discourage = true;
|
||||
LogDebug(BCLog::NET, "Misbehaving: peer=%d%s\n", peer.m_id, message_prefixed);
|
||||
TRACEPOINT(net, misbehaving_connection,
|
||||
peer.m_id,
|
||||
message.c_str()
|
||||
);
|
||||
}
|
||||
|
||||
void PeerManagerImpl::MaybePunishNodeForBlock(NodeId nodeid, const BlockValidationState& state,
|
||||
|
||||
Reference in New Issue
Block a user