Add CNetAddr::IsPrivacyNet() and CNode::IsConnectedThroughPrivacyNet()

Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
This commit is contained in:
Jon Atack
2023-07-19 11:11:06 -06:00
parent df488563b2
commit 07f5891588
3 changed files with 15 additions and 0 deletions

View File

@@ -620,6 +620,11 @@ Network CNode::ConnectedThroughNetwork() const
return m_inbound_onion ? NET_ONION : addr.GetNetClass();
}
bool CNode::IsConnectedThroughPrivacyNet() const
{
return m_inbound_onion || addr.IsPrivacyNet();
}
#undef X
#define X(name) stats.name = name
void CNode::CopyStats(CNodeStats& stats)