net: Add CNode::ConnectedThroughNetwork member function

This commit is contained in:
Hennadii Stepanov
2020-09-30 19:19:19 +03:00
parent d4dde24034
commit 49fba9c1aa
4 changed files with 19 additions and 2 deletions

View File

@@ -539,6 +539,11 @@ void CNode::SetAddrLocal(const CService& addrLocalIn) {
}
}
Network CNode::ConnectedThroughNetwork() const
{
return IsInboundConn() && m_inbound_onion ? NET_ONION : addr.GetNetClass();
}
#undef X
#define X(name) stats.name = name
void CNode::copyStats(CNodeStats &stats, const std::vector<bool> &m_asmap)