diff options
author | Amiti Uttarwar <amiti@uttarwar.org> | 2020-05-06 18:09:24 -0700 |
---|---|---|
committer | Amiti Uttarwar <amiti@uttarwar.org> | 2020-08-07 17:18:16 -0700 |
commit | 26304b4100201754fb32440bec3e3b78cd3f0e6d (patch) | |
tree | 1aadcecb1da5587af74c741e24ad0b2fc8377f65 /src/net.h | |
parent | 3f1b7140e95d0f8f958cb35f31c3d964c57e484d (diff) | |
download | bitcoin-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.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; |