From e60360e139852c655930e99d4bb4db554cd8385e Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Sat, 31 Dec 2016 02:05:36 -0500 Subject: net: remove cs_vRecvMsg vRecvMsg is now only touched by the socket handler thread. The accounting vars (nRecvBytes/nLastRecv/mapRecvBytesPerMsgCmd) are also only used by the socket handler thread, with the exception of queries from rpc/gui. These accesses are not threadsafe, but they never were. This needs to be addressed separately. Also, update comment describing data flow --- src/net.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/net.h') diff --git a/src/net.h b/src/net.h index db73be477f..982a08f03a 100644 --- a/src/net.h +++ b/src/net.h @@ -613,8 +613,6 @@ public: size_t nProcessQueueSize; std::deque vRecvGetData; - std::list vRecvMsg; - CCriticalSection cs_vRecvMsg; uint64_t nRecvBytes; std::atomic nRecvVersion; @@ -726,6 +724,7 @@ private: const ServiceFlags nLocalServices; const int nMyStartingHeight; int nSendVersion; + std::list vRecvMsg; // Used only by SocketHandler thread public: NodeId GetId() const { @@ -746,7 +745,6 @@ public: return nRefCount; } - // requires LOCK(cs_vRecvMsg) bool ReceiveMsgBytes(const char *pch, unsigned int nBytes, bool& complete); void SetRecvVersion(int nVersionIn) -- cgit v1.2.3