diff options
author | Amiti Uttarwar <amiti@uttarwar.org> | 2020-04-29 17:33:06 -0700 |
---|---|---|
committer | Amiti Uttarwar <amiti@uttarwar.org> | 2020-08-07 17:18:16 -0700 |
commit | e1bc29812ddf1d946bc5acca406a7ed2dca064a6 (patch) | |
tree | 5bb4ee47501ee13e25810a68de1702bf54736592 /src/net.h | |
parent | 0e52a659a2de915fc3dce37fc8fac39be1c8b6fa (diff) |
[net/refactor] Add block relay only connections to ConnectionType enum
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -118,6 +118,7 @@ enum class ConnectionType { OUTBOUND, MANUAL, FEELER, + BLOCK_RELAY, }; class NetEventsInterface; @@ -203,7 +204,7 @@ public: bool GetNetworkActive() const { return fNetworkActive; }; bool GetUseAddrmanOutgoing() const { return m_use_addrman_outgoing; }; void SetNetworkActive(bool active); - void OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound = nullptr, const char *strDest = nullptr, bool m_addr_fetch = false, ConnectionType conn_type = ConnectionType::OUTBOUND, bool block_relay_only = false); + void OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound = nullptr, const char *strDest = nullptr, bool m_addr_fetch = false, ConnectionType conn_type = ConnectionType::OUTBOUND); bool CheckIncomingNonce(uint64_t nonce); bool ForNode(NodeId id, std::function<bool(CNode* pnode)> func); @@ -368,7 +369,7 @@ private: CNode* FindNode(const CService& addr); bool AttemptToEvictConnection(); - CNode* ConnectNode(CAddress addrConnect, const char *pszDest, bool fCountFailure, ConnectionType conn_type, bool block_relay_only); + CNode* ConnectNode(CAddress addrConnect, const char *pszDest, bool fCountFailure, ConnectionType conn_type); void AddWhitelistPermissionFlags(NetPermissionFlags& flags, const CNetAddr &addr) const; void DeleteNode(CNode* pnode); @@ -862,7 +863,7 @@ public: std::set<uint256> orphan_work_set; - 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 = ConnectionType::OUTBOUND, bool block_relay_only = 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 = ConnectionType::OUTBOUND); ~CNode(); CNode(const CNode&) = delete; CNode& operator=(const CNode&) = delete; |