mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
p2p: allow CConnman::GetAddresses() by network, add doxygen
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user