diff options
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -831,7 +831,6 @@ public: std::deque<CInv> vRecvGetData; uint64_t nRecvBytes GUARDED_BY(cs_vRecv){0}; - std::atomic<int> nRecvVersion{INIT_PROTO_VERSION}; std::atomic<int64_t> nLastSend{0}; std::atomic<int64_t> nLastRecv{0}; @@ -1018,6 +1017,7 @@ private: const NodeId id; const uint64_t nLocalHostNonce; const ConnectionType m_conn_type; + std::atomic<int> m_greatest_common_version{INIT_PROTO_VERSION}; //! Services offered to this peer. //! @@ -1037,7 +1037,6 @@ private: const ServiceFlags nLocalServices; const int nMyStartingHeight; - int nSendVersion{0}; NetPermissionFlags m_permissionFlags{ PF_NONE }; std::list<CNetMessage> vRecvMsg; // Used only by SocketHandler thread @@ -1069,16 +1068,14 @@ public: bool ReceiveMsgBytes(const char *pch, unsigned int nBytes, bool& complete); - void SetRecvVersion(int nVersionIn) + void SetCommonVersion(int greatest_common_version) { - nRecvVersion = nVersionIn; + m_greatest_common_version = greatest_common_version; } - int GetRecvVersion() const + int GetCommonVersion() const { - return nRecvVersion; + return m_greatest_common_version; } - void SetSendVersion(int nVersionIn); - int GetSendVersion() const; CService GetAddrLocal() const; //! May not be called more than once |