aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.cpp
diff options
context:
space:
mode:
authorAmiti Uttarwar <amiti@uttarwar.org>2023-01-13 14:23:38 -0800
committerMartin Zumsande <mzumsande@gmail.com>2023-01-26 18:11:13 -0500
commit80f39c99ef2d30e3e2d8dbc068d25cf92aa32344 (patch)
tree1950ae737086c50aaf42788b740e5886e5408ae4 /src/addrman.cpp
parent4885d6f197736cb89fdfac250b280ec10829d903 (diff)
addrman, refactor: combine two size functions
The functionality of the old size() is covered by the new Size() when no arguments are specified, so this does not change behavior. Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
Diffstat (limited to 'src/addrman.cpp')
-rw-r--r--src/addrman.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp
index 4ffb7617b0..01ea723dd2 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -1112,12 +1112,6 @@ int AddrManImpl::CheckAddrman() const
return 0;
}
-size_t AddrManImpl::size() const
-{
- LOCK(cs); // TODO: Cache this in an atomic to avoid this overhead
- return vRandom.size();
-}
-
size_t AddrManImpl::Size(std::optional<Network> net, std::optional<bool> in_new) const
{
LOCK(cs);
@@ -1239,11 +1233,6 @@ template void AddrMan::Unserialize(CHashVerifier<CAutoFile>& s);
template void AddrMan::Unserialize(CDataStream& s);
template void AddrMan::Unserialize(CHashVerifier<CDataStream>& s);
-size_t AddrMan::size() const
-{
- return m_impl->size();
-}
-
size_t AddrMan::Size(std::optional<Network> net, std::optional<bool> in_new) const
{
return m_impl->Size(net, in_new);