File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2860,7 +2860,7 @@ void CConnman::PushMessage(CNode* pnode, CSerializedNetMsg&& msg)
2860
2860
bool optimisticSend (pnode->vSendMsg .empty ());
2861
2861
2862
2862
// log total amount of bytes per message type
2863
- pnode->mapSendBytesPerMsgType [ msg.m_type ] += nTotalSize;
2863
+ pnode->AccountForSentBytes ( msg.m_type , nTotalSize) ;
2864
2864
pnode->nSendSize += nTotalSize;
2865
2865
2866
2866
if (pnode->nSendSize > nSendBufferMaxSize) pnode->fPauseSend = true ;
Original file line number Diff line number Diff line change @@ -430,6 +430,13 @@ class CNode
430
430
std::optional<std::pair<CNetMessage, bool >> PollMessage (size_t recv_flood_size)
431
431
EXCLUSIVE_LOCKS_REQUIRED(!m_msg_process_queue_mutex);
432
432
433
+ /* * Account for the total size of a sent message in the per msg type connection stats. */
434
+ void AccountForSentBytes (const std::string& msg_type, size_t sent_bytes)
435
+ EXCLUSIVE_LOCKS_REQUIRED(cs_vSend)
436
+ {
437
+ mapSendBytesPerMsgType[msg_type] += sent_bytes;
438
+ }
439
+
433
440
bool IsOutboundOrBlockRelayConn () const {
434
441
switch (m_conn_type) {
435
442
case ConnectionType::OUTBOUND_FULL_RELAY:
You can’t perform that action at this time.
0 commit comments