aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.h
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.h
parent4885d6f197736cb89fdfac250b280ec10829d903 (diff)
downloadbitcoin-80f39c99ef2d30e3e2d8dbc068d25cf92aa32344.tar.xz
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.h')
-rw-r--r--src/addrman.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/addrman.h b/src/addrman.h
index 1c7254b5d7..2a074268be 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -99,9 +99,6 @@ public:
template <typename Stream>
void Unserialize(Stream& s_);
- //! Return the number of (unique) addresses in all tables.
- size_t size() const;
-
/**
* Return size information about addrman.
*
@@ -109,7 +106,7 @@ public:
* @param[in] in_new Select addresses only from one table (true = new, false = tried, nullopt = both)
* @return Number of unique addresses that match specified options.
*/
- size_t Size(std::optional<Network> net, std::optional<bool> in_new) const;
+ size_t Size(std::optional<Network> net = {}, std::optional<bool> in_new = {}) const;
/**
* Attempt to add one or more addresses to addrman's new table.