aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net.h b/src/net.h
index 6316c73eee..a191ca8e03 100644
--- a/src/net.h
+++ b/src/net.h
@@ -1095,7 +1095,7 @@ private:
CService addrLocal GUARDED_BY(cs_addrLocal);
mutable RecursiveMutex cs_addrLocal;
- //! Whether this peer connected via our Tor onion service.
+ //! Whether this peer is an inbound onion, e.g. connected via our Tor onion service.
const bool m_inbound_onion{false};
public:
@@ -1219,6 +1219,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. */