mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
tracing: add misbehaving conn tracepoint
This commit is contained in:
parent
68c1ef4f19
commit
b2ad6ede95
3 changed files with 81 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue