aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/addrman.h')
-rw-r--r--src/addrman.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/addrman.h b/src/addrman.h
index 5099c8c7a3..4985fc764c 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -1,5 +1,5 @@
// Copyright (c) 2012 Pieter Wuille
-// Copyright (c) 2012-2021 The Bitcoin Core developers
+// Copyright (c) 2012-2022 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -99,8 +99,14 @@ 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.
+ *
+ * @param[in] net Select addresses only from specified network (nullopt = all)
+ * @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::nullopt, std::optional<bool> in_new = std::nullopt) const;
/**
* Attempt to add one or more addresses to addrman's new table.