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