mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-10 09:06:15 +01:00
net: add All()
in ReachableNets
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
This commit is contained in:
parent
e4fb97a512
commit
f698636ec8
1 changed files with 7 additions and 0 deletions
|
@ -134,6 +134,13 @@ public:
|
||||||
return Contains(addr.GetNetwork());
|
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:
|
private:
|
||||||
mutable Mutex m_mutex;
|
mutable Mutex m_mutex;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue