aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2021-05-02 19:05:42 +0200
committerJon Atack <jon@atack.com>2021-05-19 13:05:54 +0200
commit80ba294854e5025bcada58f1403858e6ea1d4380 (patch)
tree24849fb98a37fdf03e65b92d4b030dc547c9a07b /src/net.h
parenta49f3ddbbabfb971a537f0a6c7affb24e20ff192 (diff)
p2p: allow CConnman::GetAddresses() by network, add doxygen
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/net.h b/src/net.h
index 65b262e573..28f2d9ace6 100644
--- a/src/net.h
+++ b/src/net.h
@@ -923,7 +923,14 @@ public:
};
// Addrman functions
- std::vector<CAddress> GetAddresses(size_t max_addresses, size_t max_pct) const;
+ /**
+ * Return all or many randomly selected addresses, optionally by network.
+ *
+ * @param[in] max_addresses Maximum number of addresses to return (0 = all).
+ * @param[in] max_pct Maximum percentage of addresses to return (0 = all).
+ * @param[in] network Select only addresses of this network (nullopt = all).
+ */
+ std::vector<CAddress> GetAddresses(size_t max_addresses, size_t max_pct, std::optional<Network> network) const;
/**
* Cache is used to minimize topology leaks, so it should
* be used for all non-trusted calls, for example, p2p.