Skip to content

Commit a4706bc

Browse files
theStacksipa
authored andcommitted
rpc: don't report v2 handshake bytes in the per-type sent byte statistics
This matches the behavior for per-type received bytes.
1 parent abf343b commit a4706bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/net.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,9 @@ std::pair<size_t, bool> CConnman::SocketSendData(CNode& node) const
16091609
// Notify transport that bytes have been processed.
16101610
node.m_transport->MarkBytesSent(nBytes);
16111611
// Update statistics per message type.
1612-
node.AccountForSentBytes(msg_type, nBytes);
1612+
if (!msg_type.empty()) { // don't report v2 handshake bytes for now
1613+
node.AccountForSentBytes(msg_type, nBytes);
1614+
}
16131615
nSentSize += nBytes;
16141616
if ((size_t)nBytes != data.size()) {
16151617
// could not send full message; stop sending more

0 commit comments

Comments
 (0)