diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2023-09-26 18:07:36 -0400 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2023-10-02 18:09:53 -0400 |
commit | a4706bc877504057e8522c929cc0704d3eaa7302 (patch) | |
tree | 9de2ac46f58890a0ce845ae0a101c6280178c86b /src/net.cpp | |
parent | abf343b32026c3f8246f98c416e2c6cf5b66aa38 (diff) |
rpc: don't report v2 handshake bytes in the per-type sent byte statistics
This matches the behavior for per-type received bytes.
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index df8f3acfd1..72aef92e62 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1609,7 +1609,9 @@ std::pair<size_t, bool> CConnman::SocketSendData(CNode& node) const // Notify transport that bytes have been processed. node.m_transport->MarkBytesSent(nBytes); // Update statistics per message type. - node.AccountForSentBytes(msg_type, nBytes); + if (!msg_type.empty()) { // don't report v2 handshake bytes for now + node.AccountForSentBytes(msg_type, nBytes); + } nSentSize += nBytes; if ((size_t)nBytes != data.size()) { // could not send full message; stop sending more |