mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
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>
This commit is contained in:
committed by
Martin Zumsande
parent
4885d6f197
commit
80f39c99ef
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user