aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/net.h b/src/net.h
index 8d9925265d..36043b0b8c 100644
--- a/src/net.h
+++ b/src/net.h
@@ -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: