p2p: allow CConnman::GetAddresses() by network, add doxygen

This commit is contained in:
Jon Atack
2021-05-02 19:05:42 +02:00
parent a49f3ddbba
commit 80ba294854
5 changed files with 24 additions and 8 deletions

View File

@@ -28,6 +28,8 @@
#include <version.h>
#include <warnings.h>
#include <optional>
#include <univalue.h>
const std::vector<std::string> CONNECTION_TYPE_DOC{
@@ -878,7 +880,7 @@ static RPCHelpMan getnodeaddresses()
if (count < 0) throw JSONRPCError(RPC_INVALID_PARAMETER, "Address count out of range");
// returns a shuffled list of CAddress
const std::vector<CAddress> vAddr{connman.GetAddresses(count, /* max_pct */ 0)};
const std::vector<CAddress> vAddr{connman.GetAddresses(count, /* max_pct */ 0, /* network */ std::nullopt)};
UniValue ret(UniValue::VARR);
for (const CAddress& addr : vAddr) {