[#AddrMan-GetAddr] = xref:AddrMan.adoc[AddrMan]::GetAddr :relfileprefix: ../ :mrdocs: Return all or many randomly selected addresses, optionally by network. == Synopsis Declared in `<addrman.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::vector<CAddress> GetAddr( size_t max_addresses, size_t max_pct, std::optional<Network> network, bool filtered = true) const; ---- == Return Value A vector of randomly selected addresses from vRandom. == Parameters [cols="1,4"] |=== | Name| Description | *max_addresses* [in] | Maximum number of addresses to return (0 = all). | *max_pct* [in] | Maximum percentage of addresses to return (0 = all). Value must be from 0 to 100. | *network* [in] | Select only addresses of this network (nullopt = all). | *filtered* [in] | Select only addresses that are considered good quality (false = all). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#