mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
net: move nLastNodeId to CConnman
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user