Changeset View
Changeset View
Standalone View
Standalone View
src/net.h
Show First 20 Lines • Show All 396 Lines • ▼ Show 20 Lines | private: | ||||
uint64_t nMaxOutboundCycleStartTime GUARDED_BY(cs_totalBytesSent); | uint64_t nMaxOutboundCycleStartTime GUARDED_BY(cs_totalBytesSent); | ||||
uint64_t nMaxOutboundLimit GUARDED_BY(cs_totalBytesSent); | uint64_t nMaxOutboundLimit GUARDED_BY(cs_totalBytesSent); | ||||
uint64_t nMaxOutboundTimeframe GUARDED_BY(cs_totalBytesSent); | uint64_t nMaxOutboundTimeframe GUARDED_BY(cs_totalBytesSent); | ||||
// Whitelisted ranges. Any node connecting from these is automatically | // Whitelisted ranges. Any node connecting from these is automatically | ||||
// whitelisted (as well as those connecting to whitelisted binds). | // whitelisted (as well as those connecting to whitelisted binds). | ||||
std::vector<CSubNet> vWhitelistedRange; | std::vector<CSubNet> vWhitelistedRange; | ||||
unsigned int nSendBufferMaxSize; | unsigned int nSendBufferMaxSize{0}; | ||||
unsigned int nReceiveFloodSize; | unsigned int nReceiveFloodSize{0}; | ||||
std::vector<ListenSocket> vhListenSocket; | std::vector<ListenSocket> vhListenSocket; | ||||
std::atomic<bool> fNetworkActive; | std::atomic<bool> fNetworkActive{true}; | ||||
banmap_t setBanned GUARDED_BY(cs_setBanned); | banmap_t setBanned GUARDED_BY(cs_setBanned); | ||||
CCriticalSection cs_setBanned; | CCriticalSection cs_setBanned; | ||||
bool setBannedIsDirty GUARDED_BY(cs_setBanned); | bool setBannedIsDirty GUARDED_BY(cs_setBanned){false}; | ||||
bool fAddressesInitialized; | bool fAddressesInitialized{false}; | ||||
CAddrMan addrman; | CAddrMan addrman; | ||||
std::deque<std::string> vOneShots GUARDED_BY(cs_vOneShots); | std::deque<std::string> vOneShots GUARDED_BY(cs_vOneShots); | ||||
CCriticalSection cs_vOneShots; | CCriticalSection cs_vOneShots; | ||||
std::vector<std::string> vAddedNodes GUARDED_BY(cs_vAddedNodes); | std::vector<std::string> vAddedNodes GUARDED_BY(cs_vAddedNodes); | ||||
CCriticalSection cs_vAddedNodes; | CCriticalSection cs_vAddedNodes; | ||||
std::vector<CNode *> vNodes; | std::vector<CNode *> vNodes; | ||||
std::list<CNode *> vNodesDisconnected; | std::list<CNode *> vNodesDisconnected; | ||||
mutable CCriticalSection cs_vNodes; | mutable CCriticalSection cs_vNodes; | ||||
std::atomic<NodeId> nLastNodeId; | std::atomic<NodeId> nLastNodeId{0}; | ||||
unsigned int nPrevNodeCount; | unsigned int nPrevNodeCount{0}; | ||||
/** Services this instance offers */ | /** Services this instance offers */ | ||||
ServiceFlags nLocalServices; | ServiceFlags nLocalServices; | ||||
std::unique_ptr<CSemaphore> semOutbound; | std::unique_ptr<CSemaphore> semOutbound; | ||||
std::unique_ptr<CSemaphore> semAddnode; | std::unique_ptr<CSemaphore> semAddnode; | ||||
int nMaxConnections; | int nMaxConnections; | ||||
int nMaxOutbound; | int nMaxOutbound; | ||||
int nMaxAddnode; | int nMaxAddnode; | ||||
int nMaxFeeler; | int nMaxFeeler; | ||||
std::atomic<int> nBestHeight; | std::atomic<int> nBestHeight; | ||||
CClientUIInterface *clientInterface; | CClientUIInterface *clientInterface; | ||||
NetEventsInterface *m_msgproc; | NetEventsInterface *m_msgproc; | ||||
/** SipHasher seeds for deterministic randomness */ | /** SipHasher seeds for deterministic randomness */ | ||||
const uint64_t nSeed0, nSeed1; | const uint64_t nSeed0, nSeed1; | ||||
/** flag for waking the message processor. */ | /** flag for waking the message processor. */ | ||||
bool fMsgProcWake; | bool fMsgProcWake; | ||||
std::condition_variable condMsgProc; | std::condition_variable condMsgProc; | ||||
Mutex mutexMsgProc; | Mutex mutexMsgProc; | ||||
std::atomic<bool> flagInterruptMsgProc; | std::atomic<bool> flagInterruptMsgProc{false}; | ||||
CThreadInterrupt interruptNet; | CThreadInterrupt interruptNet; | ||||
std::thread threadDNSAddressSeed; | std::thread threadDNSAddressSeed; | ||||
std::thread threadSocketHandler; | std::thread threadSocketHandler; | ||||
std::thread threadOpenAddedConnections; | std::thread threadOpenAddedConnections; | ||||
std::thread threadOpenConnections; | std::thread threadOpenConnections; | ||||
std::thread threadMessageHandler; | std::thread threadMessageHandler; | ||||
▲ Show 20 Lines • Show All 429 Lines • Show Last 20 Lines |