diff options
author | Jon Atack <jon@atack.com> | 2020-10-21 11:53:38 +0200 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2020-12-17 19:56:12 +0100 |
commit | 86c495223f048e5ca2cf0d8730af7db3b76f7aba (patch) | |
tree | b70377a1fe0754b0536735984ac7ebb1e3214ce1 /src/net.h | |
parent | 6609eb8cb50fe92c7317b5db9e72d4333b3aab1b (diff) | |
download | bitcoin-86c495223f048e5ca2cf0d8730af7db3b76f7aba.tar.xz |
net: add CNode::IsInboundOnion() public getter and unit tests
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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. */ |