diff options
author | dergoegge <n.goeggi@gmail.com> | 2023-03-14 17:48:32 +0100 |
---|---|---|
committer | dergoegge <n.goeggi@gmail.com> | 2023-03-22 13:18:57 +0100 |
commit | 3eac5e7cd1eda6ababb9af9cd72dae08d395993d (patch) | |
tree | 428a3867043c8e81cb8bb8d84345de588cecfd67 /src/net.h | |
parent | 60441a3432df10f5d7c15c09c9569f27a793625b (diff) |
[net] Add CNode helper for send byte accounting
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -430,6 +430,13 @@ public: std::optional<std::pair<CNetMessage, bool>> PollMessage(size_t recv_flood_size) EXCLUSIVE_LOCKS_REQUIRED(!m_msg_process_queue_mutex); + /** Account for the total size of a sent message in the per msg type connection stats. */ + void AccountForSentBytes(const std::string& msg_type, size_t sent_bytes) + EXCLUSIVE_LOCKS_REQUIRED(cs_vSend) + { + mapSendBytesPerMsgType[msg_type] += sent_bytes; + } + bool IsOutboundOrBlockRelayConn() const { switch (m_conn_type) { case ConnectionType::OUTBOUND_FULL_RELAY: |