mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-08 05:39:38 +02:00
Expose integral m_conn_type in CNodeStats, remove m_conn_type_string
This commit is contained in:
@@ -180,6 +180,8 @@ enum class ConnectionType {
|
||||
ADDR_FETCH,
|
||||
};
|
||||
|
||||
/** Convert ConnectionType enum to a string value */
|
||||
std::string ConnectionTypeAsString(ConnectionType conn_type);
|
||||
void Discover();
|
||||
void StartMapPort();
|
||||
void InterruptMapPort();
|
||||
@@ -273,11 +275,10 @@ public:
|
||||
// Network the peer connected through
|
||||
Network m_network;
|
||||
uint32_t m_mapped_as;
|
||||
std::string m_conn_type_string;
|
||||
ConnectionType m_conn_type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/** Transport protocol agnostic message container.
|
||||
* Ideally it should only contain receive time, payload,
|
||||
* command and size.
|
||||
@@ -765,7 +766,7 @@ public:
|
||||
//! Sets the addrName only if it was not previously set
|
||||
void MaybeSetAddrName(const std::string& addrNameIn);
|
||||
|
||||
std::string ConnectionTypeAsString() const;
|
||||
std::string ConnectionTypeAsString() const { return ::ConnectionTypeAsString(m_conn_type); }
|
||||
|
||||
/** Whether this peer is an inbound onion, e.g. connected via our Tor onion service. */
|
||||
bool IsInboundOnion() const { return m_inbound_onion; }
|
||||
|
||||
Reference in New Issue
Block a user