@@ -370,14 +370,14 @@ class CConnman
370370 // Network usage totals
371371 CCriticalSection cs_totalBytesRecv;
372372 CCriticalSection cs_totalBytesSent;
373- uint64_t nTotalBytesRecv;
374- uint64_t nTotalBytesSent;
373+ uint64_t nTotalBytesRecv GUARDED_BY (cs_totalBytesRecv) ;
374+ uint64_t nTotalBytesSent GUARDED_BY (cs_totalBytesSent) ;
375375
376376 // outbound limit & stats
377- uint64_t nMaxOutboundTotalBytesSentInCycle;
378- uint64_t nMaxOutboundCycleStartTime;
379- uint64_t nMaxOutboundLimit;
380- uint64_t nMaxOutboundTimeframe;
377+ uint64_t nMaxOutboundTotalBytesSentInCycle GUARDED_BY (cs_totalBytesSent) ;
378+ uint64_t nMaxOutboundCycleStartTime GUARDED_BY (cs_totalBytesSent) ;
379+ uint64_t nMaxOutboundLimit GUARDED_BY (cs_totalBytesSent) ;
380+ uint64_t nMaxOutboundTimeframe GUARDED_BY (cs_totalBytesSent) ;
381381
382382 // Whitelisted ranges. Any node connecting from these is automatically
383383 // whitelisted (as well as those connecting to whitelisted binds).
@@ -395,7 +395,7 @@ class CConnman
395395 CAddrMan addrman;
396396 std::deque<std::string> vOneShots;
397397 CCriticalSection cs_vOneShots;
398- std::vector<std::string> vAddedNodes;
398+ std::vector<std::string> vAddedNodes GUARDED_BY (cs_vAddedNodes) ;
399399 CCriticalSection cs_vAddedNodes;
400400 std::vector<CNode*> vNodes;
401401 std::list<CNode*> vNodesDisconnected;
0 commit comments