diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-01-02 10:25:05 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-01-02 10:24:45 +0100 |
commit | faaa4f2b6af4ce249fc4809a030240afa45b1a33 (patch) | |
tree | 3a2963ed2a2e2e3f5b34638f7913bc4e00010a1e /src/net.h | |
parent | ae8f79713543d3db24a886cc27340b1570c2657d (diff) |
refactor: Remove nMyStartingHeight from CNode/Connman
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -200,7 +200,6 @@ public: int m_max_outbound_block_relay = 0; int nMaxAddnode = 0; int nMaxFeeler = 0; - int nBestHeight = 0; CClientUIInterface* uiInterface = nullptr; NetEventsInterface* m_msgproc = nullptr; BanMan* m_banman = nullptr; @@ -228,7 +227,6 @@ public: nMaxAddnode = connOptions.nMaxAddnode; nMaxFeeler = connOptions.nMaxFeeler; m_max_outbound = m_max_outbound_full_relay + m_max_outbound_block_relay + nMaxFeeler; - nBestHeight = connOptions.nBestHeight; clientInterface = connOptions.uiInterface; m_banman = connOptions.m_banman; m_msgproc = connOptions.m_msgproc; @@ -382,9 +380,6 @@ public: uint64_t GetTotalBytesRecv(); uint64_t GetTotalBytesSent(); - void SetBestHeight(int height); - int GetBestHeight() const; - /** Get a unique deterministic randomizer. */ CSipHasher GetDeterministicRandomizer(uint64_t id) const; @@ -559,7 +554,6 @@ private: int nMaxFeeler; int m_max_outbound; bool m_use_addrman_outgoing; - std::atomic<int> nBestHeight; CClientUIInterface* clientInterface; NetEventsInterface* m_msgproc; /** Pointer to this node's banman. May be nullptr - check existence before dereferencing. */ @@ -1056,7 +1050,7 @@ public: // Whether a ping is requested. std::atomic<bool> fPingQueued{false}; - CNode(NodeId id, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn, SOCKET hSocketIn, const CAddress &addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn, const CAddress &addrBindIn, const std::string &addrNameIn, ConnectionType conn_type_in, bool inbound_onion = false); + CNode(NodeId id, ServiceFlags nLocalServicesIn, SOCKET hSocketIn, const CAddress& addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn, const CAddress& addrBindIn, const std::string& addrNameIn, ConnectionType conn_type_in, bool inbound_onion = false); ~CNode(); CNode(const CNode&) = delete; CNode& operator=(const CNode&) = delete; @@ -1084,7 +1078,6 @@ private: //! service advertisements. const ServiceFlags nLocalServices; - const int nMyStartingHeight; NetPermissionFlags m_permissionFlags{ PF_NONE }; std::list<CNetMessage> vRecvMsg; // Used only by SocketHandler thread @@ -1108,10 +1101,6 @@ public: return nLocalHostNonce; } - int GetMyStartingHeight() const { - return nMyStartingHeight; - } - int GetRefCount() const { assert(nRefCount >= 0); |