aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorAmiti Uttarwar <amiti@uttarwar.org>2020-04-29 14:55:59 -0700
committerAmiti Uttarwar <amiti@uttarwar.org>2020-08-07 17:18:16 -0700
commit1521c47438537e192230486dffcec0228a53878d (patch)
tree826c01d4ca48a96097f951da760d361c58693fc2 /src/net.h
parent26304b4100201754fb32440bec3e3b78cd3f0e6d (diff)
downloadbitcoin-1521c47438537e192230486dffcec0228a53878d.tar.xz
[net/refactor] Add manual connections to ConnectionType enum
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net.h b/src/net.h
index da99c5f67f..f7741e8370 100644
--- a/src/net.h
+++ b/src/net.h
@@ -116,6 +116,7 @@ struct CSerializedNetMsg
enum class ConnectionType {
INBOUND,
OUTBOUND,
+ MANUAL,
};
class NetEventsInterface;
@@ -201,7 +202,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, bool fFeeler = false, bool manual_connection = false, bool block_relay_only = false);
+ void OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound = nullptr, const char *strDest = nullptr, bool m_addr_fetch = false, bool fFeeler = false, ConnectionType conn_type = ConnectionType::OUTBOUND, bool block_relay_only = false);
bool CheckIncomingNonce(uint64_t nonce);
bool ForNode(NodeId id, std::function<bool(CNode* pnode)> func);
@@ -366,7 +367,7 @@ private:
CNode* FindNode(const CService& addr);
bool AttemptToEvictConnection();
- CNode* ConnectNode(CAddress addrConnect, const char *pszDest, bool fCountFailure, bool manual_connection, bool block_relay_only);
+ CNode* ConnectNode(CAddress addrConnect, const char *pszDest, bool fCountFailure, ConnectionType conn_type, bool block_relay_only);
void AddWhitelistPermissionFlags(NetPermissionFlags& flags, const CNetAddr &addr) const;
void DeleteNode(CNode* pnode);