Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/net.cpp
Show All 16 Lines | |||||
#include <node/context.h> | #include <node/context.h> | ||||
#include <policy/settings.h> | #include <policy/settings.h> | ||||
#include <rpc/blockchain.h> | #include <rpc/blockchain.h> | ||||
#include <rpc/protocol.h> | #include <rpc/protocol.h> | ||||
#include <rpc/util.h> | #include <rpc/util.h> | ||||
#include <sync.h> | #include <sync.h> | ||||
#include <timedata.h> | #include <timedata.h> | ||||
#include <util/strencodings.h> | #include <util/strencodings.h> | ||||
#include <util/string.h> | |||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
#include <version.h> | #include <version.h> | ||||
#include <warnings.h> | #include <warnings.h> | ||||
#include <univalue.h> | #include <univalue.h> | ||||
static UniValue getconnectioncount(const Config &config, | static UniValue getconnectioncount(const Config &config, | ||||
▲ Show 20 Lines • Show All 873 Lines • ▼ Show 20 Lines | static UniValue getnodeaddresses(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"getnodeaddresses", | "getnodeaddresses", | ||||
"Return known addresses which can potentially be used to find new " | "Return known addresses which can potentially be used to find new " | ||||
"nodes in the network\n", | "nodes in the network\n", | ||||
{ | { | ||||
{"count", RPCArg::Type::NUM, /* default */ "1", | {"count", RPCArg::Type::NUM, /* default */ "1", | ||||
"How many addresses to return. Limited to the smaller of " + | "How many addresses to return. Limited to the smaller of " + | ||||
std::to_string(ADDRMAN_GETADDR_MAX) + " or " + | ToString(ADDRMAN_GETADDR_MAX) + " or " + | ||||
std::to_string(ADDRMAN_GETADDR_MAX_PCT) + | ToString(ADDRMAN_GETADDR_MAX_PCT) + | ||||
"% of all known addresses."}, | "% of all known addresses."}, | ||||
}, | }, | ||||
RPCResult{ | RPCResult{ | ||||
RPCResult::Type::ARR, | RPCResult::Type::ARR, | ||||
"", | "", | ||||
"", | "", | ||||
{ | { | ||||
{RPCResult::Type::OBJ, | {RPCResult::Type::OBJ, | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |