diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-09-30 19:19:19 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-10-03 15:38:19 +0300 |
commit | 49fba9c1aa699d3aa47ea4dafe07b47c8d0aac6e (patch) | |
tree | e58b1df3d151cb25d898e14a095b12d455ba7894 /src/net.cpp | |
parent | d4dde24034d7467883b290111da60527ab8048f8 (diff) |
net: Add CNode::ConnectedThroughNetwork member function
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index 9f8c827741..54d572c68c 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -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) |