mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Expose integral m_conn_type in CNodeStats, remove m_conn_type_string
This commit is contained in:
parent
4b8b71e630
commit
faecb74562
3 changed files with 8 additions and 7 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue