aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorw0xlt <94266259+w0xlt@users.noreply.github.com>2022-01-25 18:05:04 -0300
committerw0xlt <94266259+w0xlt@users.noreply.github.com>2022-04-18 13:23:26 -0300
commita237a065cc2c6337e3797cc30a0f84c56c6d2f3b (patch)
treed7bd090316c0b680b858445948f88872d29eb75f /src/net.h
parent5fdf37e14bb3b66264a7e6868250c2084ac39054 (diff)
downloadbitcoin-a237a065cc2c6337e3797cc30a0f84c56c6d2f3b.tar.xz
scripted-diff: rename cs_totalBytesSent -> m_total_bytes_sent_mutex
-BEGIN VERIFY SCRIPT- sed -i 's/cs_totalBytesSent/m_total_bytes_sent_mutex/g' -- $(git grep --files-with-matches 'cs_totalBytesSent') -END VERIFY SCRIPT-
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net.h b/src/net.h
index 1bc011c748..e9737278d9 100644
--- a/src/net.h
+++ b/src/net.h
@@ -776,7 +776,7 @@ public:
nReceiveFloodSize = connOptions.nReceiveFloodSize;
m_peer_connect_timeout = std::chrono::seconds{connOptions.m_peer_connect_timeout};
{
- LOCK(cs_totalBytesSent);
+ LOCK(m_total_bytes_sent_mutex);
nMaxOutboundLimit = connOptions.nMaxOutboundLimit;
}
vWhitelistedRange = connOptions.vWhitelistedRange;
@@ -1062,14 +1062,14 @@ private:
static bool NodeFullyConnected(const CNode* pnode);
// Network usage totals
- mutable RecursiveMutex cs_totalBytesSent;
+ mutable RecursiveMutex m_total_bytes_sent_mutex;
std::atomic<uint64_t> nTotalBytesRecv{0};
- uint64_t nTotalBytesSent GUARDED_BY(cs_totalBytesSent) {0};
+ uint64_t nTotalBytesSent GUARDED_BY(m_total_bytes_sent_mutex) {0};
// outbound limit & stats
- uint64_t nMaxOutboundTotalBytesSentInCycle GUARDED_BY(cs_totalBytesSent) {0};
- std::chrono::seconds nMaxOutboundCycleStartTime GUARDED_BY(cs_totalBytesSent) {0};
- uint64_t nMaxOutboundLimit GUARDED_BY(cs_totalBytesSent);
+ uint64_t nMaxOutboundTotalBytesSentInCycle GUARDED_BY(m_total_bytes_sent_mutex) {0};
+ std::chrono::seconds nMaxOutboundCycleStartTime GUARDED_BY(m_total_bytes_sent_mutex) {0};
+ uint64_t nMaxOutboundLimit GUARDED_BY(m_total_bytes_sent_mutex);
// P2P timeout in seconds
std::chrono::seconds m_peer_connect_timeout;