aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2020-11-17 22:56:21 +1000
committerAnthony Towns <aj@erisian.com.au>2020-11-18 02:29:33 +1000
commit9d09132be4ff99f98ca905c342347d5f35f13350 (patch)
tree5ee6459c9e4dfe9a3bd817d94171bf0a49ad23de /src/net.cpp
parente7986c51bc7afeca8f79f286fb5d950f469a8866 (diff)
downloadbitcoin-9d09132be4ff99f98ca905c342347d5f35f13350.tar.xz
CConnman: initialise at declaration rather than in Start()
Ensure nMaxOutboundTotalBytesSentInCycle and nMaxOutboundCycleStartTime are initialized even if CConnman::Start() is not called.
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/net.cpp b/src/net.cpp
index cf987b6995..20c1763ea6 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2445,17 +2445,6 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
{
Init(connOptions);
- {
- LOCK(cs_totalBytesRecv);
- nTotalBytesRecv = 0;
- }
- {
- LOCK(cs_totalBytesSent);
- nTotalBytesSent = 0;
- nMaxOutboundTotalBytesSentInCycle = 0;
- nMaxOutboundCycleStartTime = 0;
- }
-
if (fListen && !InitBinds(connOptions.vBinds, connOptions.vWhiteBinds, connOptions.onion_binds)) {
if (clientInterface) {
clientInterface->ThreadSafeMessageBox(