addrman: cap the max_pct to not exceed the maximum number of addresses

Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
This commit is contained in:
brunoerg
2024-11-07 08:34:16 -03:00
parent 2c90f8e08c
commit 9c5775c331
5 changed files with 7 additions and 5 deletions

View File

@@ -1152,7 +1152,7 @@ public:
* 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] max_pct Maximum percentage of addresses to return (0 = all). Value must be from 0 to 100.
* @param[in] network Select only addresses of this network (nullopt = all).
* @param[in] filtered Select only addresses that are considered high quality (false = all).
*/