aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorAmiti Uttarwar <amiti@uttarwar.org>2020-05-06 18:09:24 -0700
committerAmiti Uttarwar <amiti@uttarwar.org>2020-08-07 17:18:16 -0700
commit26304b4100201754fb32440bec3e3b78cd3f0e6d (patch)
tree1aadcecb1da5587af74c741e24ad0b2fc8377f65 /src/net.h
parent3f1b7140e95d0f8f958cb35f31c3d964c57e484d (diff)
downloadbitcoin-26304b4100201754fb32440bec3e3b78cd3f0e6d.tar.xz
[net/refactor] Introduce an enum to distinguish type of connection
- extract inbound & outbound types
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/net.h b/src/net.h
index 99d1c21f96..da99c5f67f 100644
--- a/src/net.h
+++ b/src/net.h
@@ -113,6 +113,10 @@ struct CSerializedNetMsg
std::string m_type;
};
+enum class ConnectionType {
+ INBOUND,
+ OUTBOUND,
+};
class NetEventsInterface;
class CConnman
@@ -856,7 +860,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 = "", bool fInboundIn = false, 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, bool block_relay_only = false);
~CNode();
CNode(const CNode&) = delete;
CNode& operator=(const CNode&) = delete;