mirror of
https://github.com/dogecoin/dogecoin.git
synced 2026-03-03 09:36:02 +00:00
Merge pull request #2759 from patricklodder/1.14.6-initialize-counters
net: avoid uninitialized reads on counters
This commit is contained in:
commit
e4e3371b6f
@ -2217,8 +2217,6 @@ NodeId CConnman::GetNewNodeId()
|
||||
|
||||
bool CConnman::Start(CScheduler& scheduler, std::string& strNodeError, Options connOptions)
|
||||
{
|
||||
nTotalBytesRecv = 0;
|
||||
nTotalBytesSent = 0;
|
||||
nMaxOutboundTotalBytesSentInCycle = 0;
|
||||
nMaxOutboundCycleStartTime = 0;
|
||||
|
||||
|
||||
@ -339,8 +339,8 @@ private:
|
||||
// Network usage totals
|
||||
CCriticalSection cs_totalBytesRecv;
|
||||
CCriticalSection cs_totalBytesSent;
|
||||
uint64_t nTotalBytesRecv;
|
||||
uint64_t nTotalBytesSent;
|
||||
uint64_t nTotalBytesRecv = 0;
|
||||
uint64_t nTotalBytesSent = 0;
|
||||
|
||||
// outbound limit & stats
|
||||
uint64_t nMaxOutboundTotalBytesSentInCycle;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user