aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/netbase.h')
-rw-r--r--src/netbase.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/netbase.h b/src/netbase.h
index 8ef6c28996..bf4d7ececc 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -134,6 +134,13 @@ public:
return Contains(addr.GetNetwork());
}
+ [[nodiscard]] std::unordered_set<Network> All() const EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
+ {
+ AssertLockNotHeld(m_mutex);
+ LOCK(m_mutex);
+ return m_reachable;
+ }
+
private:
mutable Mutex m_mutex;