@@ -329,22 +329,22 @@ class CConnman
329329 // Network usage totals
330330 RecursiveMutex cs_totalBytesRecv;
331331 RecursiveMutex cs_totalBytesSent;
332- uint64_t nTotalBytesRecv;
333- uint64_t nTotalBytesSent;
332+ uint64_t nTotalBytesRecv{ 0 } ;
333+ uint64_t nTotalBytesSent{ 0 } ;
334334
335335 // Whitelisted ranges. Any node connecting from these is automatically
336336 // whitelisted (as well as those connecting to whitelisted binds).
337337 std::vector<CSubNet> vWhitelistedRange;
338338 RecursiveMutex cs_vWhitelistedRange;
339339
340- unsigned int nSendBufferMaxSize;
341- unsigned int nReceiveFloodSize;
340+ unsigned int nSendBufferMaxSize{ 0 } ;
341+ unsigned int nReceiveFloodSize{ 0 } ;
342342
343343 std::vector<ListenSocket> vhListenSocket;
344344 banmap_t setBanned;
345345 RecursiveMutex cs_setBanned;
346- bool setBannedIsDirty;
347- bool fAddressesInitialized ;
346+ bool setBannedIsDirty{ false } ;
347+ bool fAddressesInitialized { false } ;
348348 CAddrMan addrman;
349349 std::deque<std::string> vOneShots;
350350 RecursiveMutex cs_vOneShots;
@@ -356,23 +356,23 @@ class CConnman
356356 std::atomic<NodeId> nLastNodeId;
357357
358358 /* * Services this instance offers */
359- ServiceFlags nLocalServices;
359+ ServiceFlags nLocalServices{NODE_NONE} ;
360360
361361 /* * Services this instance cares about */
362- ServiceFlags nRelevantServices;
362+ ServiceFlags nRelevantServices{NODE_NONE} ;
363363
364- CSemaphore *semOutbound;
365- int nMaxConnections;
366- int nMaxOutbound;
367- int nMaxFeeler;
364+ CSemaphore *semOutbound{ nullptr } ;
365+ int nMaxConnections{ 0 } ;
366+ int nMaxOutbound{ 0 } ;
367+ int nMaxFeeler{ 0 } ;
368368 std::atomic<int > nBestHeight;
369- CClientUIInterface* clientInterface;
369+ CClientUIInterface* clientInterface{ nullptr } ;
370370
371371 /* * SipHasher seeds for deterministic randomness */
372- const uint64_t nSeed0, nSeed1;
372+ const uint64_t nSeed0{ 0 } , nSeed1{ 0 } ;
373373
374374 /* * flag for waking the message processor. */
375- bool fMsgProcWake ;
375+ bool fMsgProcWake { false } ;
376376
377377 std::condition_variable condMsgProc;
378378 std::mutex mutexMsgProc;
0 commit comments