aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2021-01-02 10:44:03 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-01-07 15:18:44 +0100
commitfaecb74562d012a336837d3b39572c235ad2eb9d (patch)
tree9921c0a213a77cff964a02d084b2ca67513fee7c /src/net.cpp
parent4b8b71e630415647c75fa95d5407690b372bceff (diff)
Expose integral m_conn_type in CNodeStats, remove m_conn_type_string
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net.cpp b/src/net.cpp
index ad4af4abb2..6c099306eb 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -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