mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
[net/refactor] Introduce an enum to distinguish type of connection
- extract inbound & outbound types
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user