mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Expose integral m_conn_type in CNodeStats, remove m_conn_type_string
This commit is contained in:
@@ -507,9 +507,9 @@ void CConnman::AddWhitelistPermissionFlags(NetPermissionFlags& flags, const CNet
|
||||
}
|
||||
}
|
||||
|
||||
std::string CNode::ConnectionTypeAsString() const
|
||||
std::string ConnectionTypeAsString(ConnectionType conn_type)
|
||||
{
|
||||
switch (m_conn_type) {
|
||||
switch (conn_type) {
|
||||
case ConnectionType::INBOUND:
|
||||
return "inbound";
|
||||
case ConnectionType::MANUAL:
|
||||
@@ -627,7 +627,7 @@ void CNode::copyStats(CNodeStats &stats, const std::vector<bool> &m_asmap)
|
||||
CService addrLocalUnlocked = GetAddrLocal();
|
||||
stats.addrLocal = addrLocalUnlocked.IsValid() ? addrLocalUnlocked.ToString() : "";
|
||||
|
||||
stats.m_conn_type_string = ConnectionTypeAsString();
|
||||
X(m_conn_type);
|
||||
}
|
||||
#undef X
|
||||
|
||||
|
||||
Reference in New Issue
Block a user