aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
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.cpp
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.cpp')
-rw-r--r--src/net.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 602d56ab98..77a1d1339b 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2913,7 +2913,7 @@ void CConnman::RecordBytesRecv(uint64_t bytes)
void CConnman::RecordBytesSent(uint64_t bytes)
{
- LOCK(cs_totalBytesSent);
+ LOCK(m_total_bytes_sent_mutex);
nTotalBytesSent += bytes;
const auto now = GetTime<std::chrono::seconds>();
@@ -2929,7 +2929,7 @@ void CConnman::RecordBytesSent(uint64_t bytes)
uint64_t CConnman::GetMaxOutboundTarget() const
{
- LOCK(cs_totalBytesSent);
+ LOCK(m_total_bytes_sent_mutex);
return nMaxOutboundLimit;
}
@@ -2940,7 +2940,7 @@ std::chrono::seconds CConnman::GetMaxOutboundTimeframe() const
std::chrono::seconds CConnman::GetMaxOutboundTimeLeftInCycle() const
{
- LOCK(cs_totalBytesSent);
+ LOCK(m_total_bytes_sent_mutex);
if (nMaxOutboundLimit == 0)
return 0s;
@@ -2954,7 +2954,7 @@ std::chrono::seconds CConnman::GetMaxOutboundTimeLeftInCycle() const
bool CConnman::OutboundTargetReached(bool historicalBlockServingLimit) const
{
- LOCK(cs_totalBytesSent);
+ LOCK(m_total_bytes_sent_mutex);
if (nMaxOutboundLimit == 0)
return false;
@@ -2974,7 +2974,7 @@ bool CConnman::OutboundTargetReached(bool historicalBlockServingLimit) const
uint64_t CConnman::GetOutboundTargetBytesLeft() const
{
- LOCK(cs_totalBytesSent);
+ LOCK(m_total_bytes_sent_mutex);
if (nMaxOutboundLimit == 0)
return 0;
@@ -2988,7 +2988,7 @@ uint64_t CConnman::GetTotalBytesRecv() const
uint64_t CConnman::GetTotalBytesSent() const
{
- LOCK(cs_totalBytesSent);
+ LOCK(m_total_bytes_sent_mutex);
return nTotalBytesSent;
}