diff --git a/src/net.cpp b/src/net.cpp index 6f2831cbb..172a61c96 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -351,7 +351,6 @@ CNode* CConnman::ConnectNode(CAddress addrConnect, const char *pszDest, bool fCo if (IsLocal(addrConnect)) return NULL; - LOCK(cs_vNodes); // Look for an existing connection CNode* pnode = FindNode((CService)addrConnect); if (pnode) @@ -913,7 +912,7 @@ static bool ReverseCompareNodeTimeConnected(const NodeEvictionCandidate& a, cons static bool CompareNetGroupKeyed(const NodeEvictionCandidate &a, const NodeEvictionCandidate &b) { return a.nKeyedNetGroup < b.nKeyedNetGroup; -}; +} static bool CompareNodeBlockTime(const NodeEvictionCandidate &a, const NodeEvictionCandidate &b) { diff --git a/src/net.h b/src/net.h index e97a04443..de67e5118 100644 --- a/src/net.h +++ b/src/net.h @@ -808,8 +808,6 @@ public: ~CNode(); private: - CCriticalSection cs_nRefCount; - CNode(const CNode&); void operator=(const CNode&); @@ -842,7 +840,6 @@ public: int GetRefCount() { - LOCK(cs_nRefCount); assert(nRefCount >= 0); return nRefCount; } @@ -866,16 +863,13 @@ public: CNode* AddRef() { - LOCK(cs_nRefCount); nRefCount++; return this; } void Release() { - LOCK(cs_nRefCount); nRefCount--; - assert(nRefCount >= 0); }