Skip to content

Commit f698636

Browse files
brunoergvasild
andcommitted
net: add All() in ReachableNets
Co-authored-by: Vasil Dimov <[email protected]>
1 parent e4fb97a commit f698636

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/netbase.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,13 @@ class ReachableNets {
134134
return Contains(addr.GetNetwork());
135135
}
136136

137+
[[nodiscard]] std::unordered_set<Network> All() const EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
138+
{
139+
AssertLockNotHeld(m_mutex);
140+
LOCK(m_mutex);
141+
return m_reachable;
142+
}
143+
137144
private:
138145
mutable Mutex m_mutex;
139146

0 commit comments

Comments
 (0)