diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2016-04-17 20:20:34 -0400 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2016-09-08 12:24:06 -0400 |
commit | 551e0887db9034b1e6490a267ba864b1d26ff469 (patch) | |
tree | c2e305d10dd06a3f33242e3b72c61d25b48e0dcc /src/net.h | |
parent | 6c19d92361fe4afb26dfa5d48a0748b84bca6f12 (diff) |
net: move nLastNodeId to CConnman
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -196,6 +196,9 @@ private: bool IsWhitelistedRange(const CNetAddr &addr); void DeleteNode(CNode* pnode); + + NodeId GetNewNodeId(); + //!check is the banlist has unwritten changes bool BannedSetIsDirty(); //!set the "dirty" flag for the banlist @@ -223,6 +226,7 @@ private: CCriticalSection cs_vAddedNodes; std::vector<CNode*> vNodes; mutable CCriticalSection cs_vNodes; + std::atomic<NodeId> nLastNodeId; }; extern std::unique_ptr<CConnman> g_connman; void MapPort(bool fUseUPnP); @@ -300,9 +304,6 @@ extern int nMaxConnections; extern limitedmap<uint256, int64_t> mapAlreadyAskedFor; -extern NodeId nLastNodeId; -extern CCriticalSection cs_nLastNodeId; - /** Subversion as sent to the P2P network in `version` messages */ extern std::string strSubVersion; @@ -501,7 +502,7 @@ public: CAmount lastSentFeeFilter; int64_t nextSendTimeFeeFilter; - CNode(SOCKET hSocketIn, const CAddress &addrIn, const std::string &addrNameIn = "", bool fInboundIn = false); + CNode(NodeId id, SOCKET hSocketIn, const CAddress &addrIn, const std::string &addrNameIn = "", bool fInboundIn = false); ~CNode(); private: |