aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2020-10-21 11:53:38 +0200
committerJon Atack <jon@atack.com>2020-12-17 19:56:12 +0100
commit86c495223f048e5ca2cf0d8730af7db3b76f7aba (patch)
treeb70377a1fe0754b0536735984ac7ebb1e3214ce1 /src/net.h
parent6609eb8cb50fe92c7317b5db9e72d4333b3aab1b (diff)
downloadbitcoin-86c495223f048e5ca2cf0d8730af7db3b76f7aba.tar.xz
net: add CNode::IsInboundOnion() public getter and unit tests
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index ca5944d46b..0b7d0f406c 100644
--- a/src/net.h
+++ b/src/net.h
@@ -1234,6 +1234,9 @@ public:
void MaybeSetAddrName(const std::string& addrNameIn);
std::string ConnectionTypeAsString() const;
+
+ /** Whether this peer is an inbound onion, e.g. connected via our Tor onion service. */
+ bool IsInboundOnion() const { return m_inbound_onion; }
};
/** Return a timestamp in the future (in microseconds) for exponentially distributed events. */