Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/net.cpp
Show All 28 Lines | |||||
#include <univalue.h> | #include <univalue.h> | ||||
static UniValue getconnectioncount(const Config &config, | static UniValue getconnectioncount(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"getconnectioncount", | "getconnectioncount", | ||||
"Returns the number of connections to other nodes.\n", | "Returns the number of connections to other nodes.\n", | ||||
{}, | {}, | ||||
RPCResult{"n (numeric) The connection count\n"}, | RPCResult{RPCResult::Type::NUM, "", "The connection count"}, | ||||
RPCExamples{HelpExampleCli("getconnectioncount", "") + | RPCExamples{HelpExampleCli("getconnectioncount", "") + | ||||
HelpExampleRpc("getconnectioncount", "")}, | HelpExampleRpc("getconnectioncount", "")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
NodeContext &node = EnsureNodeContext(request.context); | NodeContext &node = EnsureNodeContext(request.context); | ||||
if (!node.connman) { | if (!node.connman) { | ||||
throw JSONRPCError( | throw JSONRPCError( | ||||
Show All 34 Lines | |||||
static UniValue getpeerinfo(const Config &config, | static UniValue getpeerinfo(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"getpeerinfo", | "getpeerinfo", | ||||
"Returns data about each connected network node as a json array of " | "Returns data about each connected network node as a json array of " | ||||
"objects.\n", | "objects.\n", | ||||
{}, | {}, | ||||
RPCResult{ | RPCResult{ | ||||
"[\n" | RPCResult::Type::ARR, | ||||
" {\n" | "", | ||||
" \"id\": n, (numeric) Peer index\n" | "", | ||||
" \"addr\":\"host:port\", (string) The IP address and port " | {{ | ||||
"of the peer\n" | RPCResult::Type::OBJ, | ||||
" \"addrbind\":\"ip:port\", (string) Bind address of the " | "", | ||||
"connection to the peer\n" | "", | ||||
" \"addrlocal\":\"ip:port\", (string) Local address as " | {{ | ||||
"reported by the peer\n" | {RPCResult::Type::NUM, "id", "Peer index"}, | ||||
" \"services\":\"xxxxxxxxxxxxxxxx\", (string) The services " | {RPCResult::Type::STR, "addr", | ||||
"offered\n" | "(host:port) The IP address and port of the peer"}, | ||||
" \"servicesnames\":[ (array) the services " | {RPCResult::Type::STR, "addrbind", | ||||
"offered, in human-readable form\n" | "(ip:port) Bind address of the connection to the peer"}, | ||||
" \"SERVICE_NAME\", (string) the service name if " | {RPCResult::Type::STR, "addrlocal", | ||||
"it is recognised\n" | "(ip:port) Local address as reported by the peer"}, | ||||
" ...\n" | {RPCResult::Type::STR_HEX, "services", | ||||
" ],\n" | "The services offered"}, | ||||
" \"relaytxes\":true|false, (boolean) Whether peer has asked " | {RPCResult::Type::ARR, | ||||
"us to relay transactions to it\n" | "servicesnames", | ||||
" \"lastsend\": ttt, (numeric) The " + | "the services offered, in human-readable form", | ||||
UNIX_EPOCH_TIME + | {{RPCResult::Type::STR, "SERVICE_NAME", | ||||
" of the last send\n" | "the service name if it is recognised"}}}, | ||||
" \"lastrecv\": ttt, (numeric) The " + | {RPCResult::Type::BOOL, "relaytxes", | ||||
UNIX_EPOCH_TIME + | "Whether peer has asked us to relay transactions to it"}, | ||||
" of the last receive\n" | {RPCResult::Type::NUM_TIME, "lastsend", | ||||
" \"bytessent\": n, (numeric) The total bytes sent\n" | "The " + UNIX_EPOCH_TIME + " of the last send"}, | ||||
" \"bytesrecv\": n, (numeric) The total bytes " | {RPCResult::Type::NUM_TIME, "lastrecv", | ||||
"received\n" | "The " + UNIX_EPOCH_TIME + " of the last receive"}, | ||||
" \"conntime\": ttt, (numeric) The " + | {RPCResult::Type::NUM, "bytessent", "The total bytes sent"}, | ||||
UNIX_EPOCH_TIME + | {RPCResult::Type::NUM, "bytesrecv", | ||||
" of the connection\n" | "The total bytes received"}, | ||||
" \"timeoffset\": ttt, (numeric) The time offset in " | {RPCResult::Type::NUM_TIME, "conntime", | ||||
"seconds\n" | "The " + UNIX_EPOCH_TIME + " of the connection"}, | ||||
" \"pingtime\": n, (numeric) ping time (if " | {RPCResult::Type::NUM, "timeoffset", | ||||
"available)\n" | "The time offset in seconds"}, | ||||
" \"minping\": n, (numeric) minimum observed ping " | {RPCResult::Type::NUM, "pingtime", | ||||
"time (if any at all)\n" | "ping time (if available)"}, | ||||
" \"pingwait\": n, (numeric) ping wait (if " | {RPCResult::Type::NUM, "minping", | ||||
"non-zero)\n" | "minimum observed ping time (if any at all)"}, | ||||
" \"version\": v, (numeric) The peer version, such " | {RPCResult::Type::NUM, "pingwait", | ||||
"as 70001\n" | "ping wait (if non-zero)"}, | ||||
" \"subver\": \"/Satoshi:0.8.5/\", (string) The string " | {RPCResult::Type::NUM, "version", | ||||
"version\n" | "The peer version, such as 70001"}, | ||||
" \"inbound\": true|false, (boolean) Inbound (true) or " | {RPCResult::Type::STR, "subver", "The string version"}, | ||||
"Outbound (false)\n" | {RPCResult::Type::BOOL, "inbound", | ||||
" \"addnode\": true|false, (boolean) Whether connection was " | "Inbound (true) or Outbound (false)"}, | ||||
"due to addnode/-connect or if it was an automatic/inbound " | {RPCResult::Type::BOOL, "addnode", | ||||
"connection\n" | "Whether connection was due to addnode/-connect or if it " | ||||
" \"startingheight\": n, (numeric) The starting height " | "was an automatic/inbound connection"}, | ||||
"(block) of the peer\n" | {RPCResult::Type::NUM, "startingheight", | ||||
" \"banscore\": n, (numeric) The ban score\n" | "The starting height (block) of the peer"}, | ||||
" \"synced_headers\": n, (numeric) The last header we " | {RPCResult::Type::NUM, "banscore", "The ban score"}, | ||||
"have in common with this peer\n" | {RPCResult::Type::NUM, "synced_headers", | ||||
" \"synced_blocks\": n, (numeric) The last block we have " | "The last header we have in common with this peer"}, | ||||
"in common with this peer\n" | {RPCResult::Type::NUM, "synced_blocks", | ||||
" \"inflight\": [\n" | "The last block we have in common with this peer"}, | ||||
" n, (numeric) The heights of blocks " | {RPCResult::Type::ARR, | ||||
"we're currently asking from this peer\n" | "inflight", | ||||
" ...\n" | "", | ||||
" ],\n" | { | ||||
" \"whitelisted\": true|false, (boolean) Whether the peer is " | {RPCResult::Type::NUM, "n", | ||||
"whitelisted\n" | "The heights of blocks we're currently asking from " | ||||
" \"minfeefilter\": n, (numeric) The minimum fee rate " | "this peer"}, | ||||
"for transactions this peer accepts\n" | }}, | ||||
" \"bytessent_per_msg\": {\n" | {RPCResult::Type::BOOL, "whitelisted", | ||||
" \"msg\": n, (numeric) The total bytes sent " | "Whether the peer is whitelisted"}, | ||||
"aggregated by message type\n" | {RPCResult::Type::NUM, "minfeefilter", | ||||
" When a message type is not listed " | "The minimum fee rate for transactions this peer accepts"}, | ||||
"in this json object, the bytes sent are 0.\n" | {RPCResult::Type::OBJ_DYN, | ||||
" Only known message types can " | "bytessent_per_msg", | ||||
"appear as keys in the object.\n" | "", | ||||
" ...\n" | {{RPCResult::Type::NUM, "msg", | ||||
" },\n" | "The total bytes sent aggregated by message type\n" | ||||
" \"bytesrecv_per_msg\": {\n" | "When a message type is not listed in this json object, " | ||||
" \"msg\": n, (numeric) The total bytes " | "the bytes sent are 0.\n" | ||||
"received aggregated by message type\n" | "Only known message types can appear as keys in the " | ||||
" When a message type is not listed " | "object."}}}, | ||||
"in this json object, the bytes received are 0.\n" | {RPCResult::Type::OBJ, | ||||
" Only known message types can " | "bytesrecv_per_msg", | ||||
"appear as keys in the object and all bytes received of unknown " | "", | ||||
"message types are listed under '" + | {{RPCResult::Type::NUM, "msg", | ||||
NET_MESSAGE_COMMAND_OTHER + | "The total bytes received aggregated by message type\n" | ||||
"'.\n" | "When a message type is not listed in this json object, " | ||||
" ...\n" | "the bytes received are 0.\n" | ||||
" }\n" | "Only known message types can appear as keys in the " | ||||
" }\n" | "object and all bytes received of unknown message types " | ||||
" ,...\n" | "are listed under '" + | ||||
"]\n"}, | NET_MESSAGE_COMMAND_OTHER + "'."}}}, | ||||
}}, | |||||
}}, | |||||
}, | |||||
RPCExamples{HelpExampleCli("getpeerinfo", "") + | RPCExamples{HelpExampleCli("getpeerinfo", "") + | ||||
HelpExampleRpc("getpeerinfo", "")}, | HelpExampleRpc("getpeerinfo", "")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
NodeContext &node = EnsureNodeContext(request.context); | NodeContext &node = EnsureNodeContext(request.context); | ||||
if (!node.connman) { | if (!node.connman) { | ||||
throw JSONRPCError( | throw JSONRPCError( | ||||
▲ Show 20 Lines • Show All 212 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"Returns information about the given added node, or all added nodes\n" | "Returns information about the given added node, or all added nodes\n" | ||||
"(note that onetry addnodes are not listed here)\n", | "(note that onetry addnodes are not listed here)\n", | ||||
{ | { | ||||
{"node", RPCArg::Type::STR, /* default */ "all nodes", | {"node", RPCArg::Type::STR, /* default */ "all nodes", | ||||
"If provided, return information about this specific node, " | "If provided, return information about this specific node, " | ||||
"otherwise all nodes are returned."}, | "otherwise all nodes are returned."}, | ||||
}, | }, | ||||
RPCResult{ | RPCResult{ | ||||
"[\n" | RPCResult::Type::ARR, | ||||
" {\n" | "", | ||||
" \"addednode\" : \"192.168.0.201\", (string) The node IP " | "", | ||||
"address or name (as provided to addnode)\n" | { | ||||
" \"connected\" : true|false, (boolean) If connected\n" | {RPCResult::Type::OBJ, | ||||
" \"addresses\" : [ (list of objects) Only " | "", | ||||
"when connected = true\n" | "", | ||||
" {\n" | { | ||||
" \"address\" : \"192.168.0.201:8333\", (string) The " | {RPCResult::Type::STR, "addednode", | ||||
"bitcoin server IP and port we're connected to\n" | "The node IP address or name (as provided to addnode)"}, | ||||
" \"connected\" : \"outbound\" (string) " | {RPCResult::Type::BOOL, "connected", "If connected"}, | ||||
"connection, inbound or outbound\n" | {RPCResult::Type::ARR, | ||||
" }\n" | "addresses", | ||||
" ]\n" | "Only when connected = true", | ||||
" }\n" | { | ||||
" ,...\n" | {RPCResult::Type::OBJ, | ||||
"]\n"}, | "", | ||||
"", | |||||
{ | |||||
{RPCResult::Type::STR, "address", | |||||
"The bitcoin server IP and port we're " | |||||
"connected to"}, | |||||
{RPCResult::Type::STR, "connected", | |||||
"connection, inbound or outbound"}, | |||||
}}, | |||||
}}, | |||||
}}, | |||||
}}, | |||||
RPCExamples{HelpExampleCli("getaddednodeinfo", "\"192.168.0.201\"") + | RPCExamples{HelpExampleCli("getaddednodeinfo", "\"192.168.0.201\"") + | ||||
HelpExampleRpc("getaddednodeinfo", "\"192.168.0.201\"")}, | HelpExampleRpc("getaddednodeinfo", "\"192.168.0.201\"")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
NodeContext &node = EnsureNodeContext(request.context); | NodeContext &node = EnsureNodeContext(request.context); | ||||
if (!node.connman) { | if (!node.connman) { | ||||
throw JSONRPCError( | throw JSONRPCError( | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
static UniValue getnettotals(const Config &config, | static UniValue getnettotals(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"getnettotals", | "getnettotals", | ||||
"Returns information about network traffic, including bytes in, " | "Returns information about network traffic, including bytes in, " | ||||
"bytes out,\n" | "bytes out,\n" | ||||
"and current time.\n", | "and current time.\n", | ||||
{}, | {}, | ||||
RPCResult{"{\n" | RPCResult{ | ||||
" \"totalbytesrecv\": n, (numeric) Total bytes received\n" | RPCResult::Type::OBJ, | ||||
" \"totalbytessent\": n, (numeric) Total bytes sent\n" | "", | ||||
" \"timemillis\": t, (numeric) Current UNIX time in " | "", | ||||
"milliseconds\n" | { | ||||
" \"uploadtarget\":\n" | {RPCResult::Type::NUM, "totalbytesrecv", | ||||
" {\n" | "Total bytes received"}, | ||||
" \"timeframe\": n, (numeric) " | {RPCResult::Type::NUM, "totalbytessent", "Total bytes sent"}, | ||||
"Length of the measuring timeframe in seconds\n" | {RPCResult::Type::NUM_TIME, "timemillis", | ||||
" \"target\": n, (numeric) " | "Current UNIX time in milliseconds"}, | ||||
"Target in bytes\n" | {RPCResult::Type::OBJ, | ||||
" \"target_reached\": true|false, (boolean) " | "uploadtarget", | ||||
"True if target is reached\n" | "", | ||||
" \"serve_historical_blocks\": true|false, (boolean) " | { | ||||
"True if serving historical blocks\n" | {RPCResult::Type::NUM, "timeframe", | ||||
" \"bytes_left_in_cycle\": t, (numeric) " | "Length of the measuring timeframe in seconds"}, | ||||
"Bytes left in current time cycle\n" | {RPCResult::Type::NUM, "target", "Target in bytes"}, | ||||
" \"time_left_in_cycle\": t (numeric) " | {RPCResult::Type::BOOL, "target_reached", | ||||
"Seconds left in current time cycle\n" | "True if target is reached"}, | ||||
" }\n" | {RPCResult::Type::BOOL, "serve_historical_blocks", | ||||
"}\n"}, | "True if serving historical blocks"}, | ||||
{RPCResult::Type::NUM, "bytes_left_in_cycle", | |||||
"Bytes left in current time cycle"}, | |||||
{RPCResult::Type::NUM, "time_left_in_cycle", | |||||
"Seconds left in current time cycle"}, | |||||
}}, | |||||
}}, | |||||
RPCExamples{HelpExampleCli("getnettotals", "") + | RPCExamples{HelpExampleCli("getnettotals", "") + | ||||
HelpExampleRpc("getnettotals", "")}, | HelpExampleRpc("getnettotals", "")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
NodeContext &node = EnsureNodeContext(request.context); | NodeContext &node = EnsureNodeContext(request.context); | ||||
if (!node.connman) { | if (!node.connman) { | ||||
throw JSONRPCError( | throw JSONRPCError( | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
static UniValue getnetworkinfo(const Config &config, | static UniValue getnetworkinfo(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"getnetworkinfo", | "getnetworkinfo", | ||||
"Returns an object containing various state info regarding P2P " | "Returns an object containing various state info regarding P2P " | ||||
"networking.\n", | "networking.\n", | ||||
{}, | {}, | ||||
RPCResult{"{\n" | RPCResult{ | ||||
" \"version\": xxxxx, (numeric) the " | RPCResult::Type::OBJ, | ||||
"server version\n" | "", | ||||
" \"subversion\": \"/Satoshi:x.x.x/\", (string) the " | "", | ||||
"server subversion string\n" | { | ||||
" \"protocolversion\": xxxxx, (numeric) the " | {RPCResult::Type::NUM, "version", "the server version"}, | ||||
"protocol version\n" | {RPCResult::Type::STR, "subversion", | ||||
" \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the " | "the server subversion string"}, | ||||
"services we offer to the network\n" | {RPCResult::Type::NUM, "protocolversion", | ||||
" \"localservicesnames\": [ (array) the " | "the protocol version"}, | ||||
"services we offer to the network, in human-readable form\n" | {RPCResult::Type::STR_HEX, "localservices", | ||||
" \"SERVICE_NAME\", (string) the " | "the services we offer to the network"}, | ||||
"service name\n" | {RPCResult::Type::ARR, | ||||
" ...\n" | "localservicesnames", | ||||
" ],\n" | "the services we offer to the network, in human-readable form", | ||||
" \"localrelay\": true|false, (bool) true if " | { | ||||
"transaction relay is requested from peers\n" | {RPCResult::Type::STR, "SERVICE_NAME", "the service name"}, | ||||
" \"timeoffset\": xxxxx, (numeric) the " | }}, | ||||
"time offset\n" | {RPCResult::Type::BOOL, "localrelay", | ||||
" \"connections\": xxxxx, (numeric) the " | "true if transaction relay is requested from peers"}, | ||||
"number of connections\n" | {RPCResult::Type::NUM, "timeoffset", "the time offset"}, | ||||
" \"networkactive\": true|false, (bool) whether " | {RPCResult::Type::NUM, "connections", | ||||
"p2p networking is enabled\n" | "the number of connections"}, | ||||
" \"networks\": [ (array) " | {RPCResult::Type::BOOL, "networkactive", | ||||
"information per network\n" | "whether p2p networking is enabled"}, | ||||
" {\n" | {RPCResult::Type::ARR, | ||||
" \"name\": \"xxx\", (string) network " | "networks", | ||||
"(ipv4, ipv6 or onion)\n" | "information per network", | ||||
" \"limited\": true|false, (boolean) is the " | { | ||||
"network limited using -onlynet?\n" | {RPCResult::Type::OBJ, | ||||
" \"reachable\": true|false, (boolean) is the " | "", | ||||
"network reachable?\n" | "", | ||||
" \"proxy\": \"host:port\" (string) the " | { | ||||
"proxy that is used for this network, or empty if none\n" | {RPCResult::Type::STR, "name", | ||||
" \"proxy_randomize_credentials\": true|false, (string) " | "network (ipv4, ipv6 or onion)"}, | ||||
"Whether randomized credentials are used\n" | {RPCResult::Type::BOOL, "limited", | ||||
" }\n" | "is the network limited using -onlynet?"}, | ||||
" ,...\n" | {RPCResult::Type::BOOL, "reachable", | ||||
" ],\n" | "is the network reachable?"}, | ||||
" \"relayfee\": x.xxxxxxxx, (numeric) " | {RPCResult::Type::STR, "proxy", | ||||
"minimum relay fee for transactions in " + | "(\"host:port\") the proxy that is used for this " | ||||
CURRENCY_UNIT + | "network, or empty if none"}, | ||||
"/kB\n" | {RPCResult::Type::BOOL, "proxy_randomize_credentials", | ||||
" \"excessutxocharge\": x.xxxxxxxx, (numeric) " | "Whether randomized credentials are used"}, | ||||
"minimum charge for excess utxos in " + | }}, | ||||
CURRENCY_UNIT + | }}, | ||||
"\n" | {RPCResult::Type::NUM, "relayfee", | ||||
" \"localaddresses\": [ (array) list of " | "minimum relay fee for transactions in " + CURRENCY_UNIT + | ||||
"local addresses\n" | "/kB"}, | ||||
" {\n" | {RPCResult::Type::NUM, "excessutxocharge", | ||||
" \"address\": \"xxxx\", (string) network " | "minimum charge for excess utxos in " + CURRENCY_UNIT}, | ||||
"address\n" | {RPCResult::Type::ARR, | ||||
" \"port\": xxx, (numeric) " | "localaddresses", | ||||
"network port\n" | "list of local addresses", | ||||
" \"score\": xxx (numeric) " | { | ||||
"relative score\n" | {RPCResult::Type::OBJ, | ||||
" }\n" | "", | ||||
" ,...\n" | "", | ||||
" ]\n" | { | ||||
" \"warnings\": \"...\" (string) any " | {RPCResult::Type::STR, "address", "network address"}, | ||||
"network and blockchain warnings\n" | {RPCResult::Type::NUM, "port", "network port"}, | ||||
"}\n"}, | {RPCResult::Type::NUM, "score", "relative score"}, | ||||
}}, | |||||
}}, | |||||
{RPCResult::Type::STR, "warnings", | |||||
"any network and blockchain warnings"}, | |||||
}}, | |||||
RPCExamples{HelpExampleCli("getnetworkinfo", "") + | RPCExamples{HelpExampleCli("getnetworkinfo", "") + | ||||
HelpExampleRpc("getnetworkinfo", "")}, | HelpExampleRpc("getnetworkinfo", "")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
UniValue obj(UniValue::VOBJ); | UniValue obj(UniValue::VOBJ); | ||||
obj.pushKV("version", CLIENT_VERSION); | obj.pushKV("version", CLIENT_VERSION); | ||||
▲ Show 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
{ | { | ||||
{"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 " + | std::to_string(ADDRMAN_GETADDR_MAX) + " or " + | ||||
std::to_string(ADDRMAN_GETADDR_MAX_PCT) + | std::to_string(ADDRMAN_GETADDR_MAX_PCT) + | ||||
"% of all known addresses."}, | "% of all known addresses."}, | ||||
}, | }, | ||||
RPCResult{ | RPCResult{ | ||||
"[\n" | RPCResult::Type::ARR, | ||||
" {\n" | "", | ||||
" \"time\": ttt, (numeric) The " + | "", | ||||
UNIX_EPOCH_TIME + | { | ||||
" of when the node was last seen\n" | {RPCResult::Type::OBJ, | ||||
" \"services\": n, (numeric) The services offered\n" | "", | ||||
" \"address\": \"host\", (string) The address of the " | "", | ||||
"node\n" | { | ||||
" \"port\": n (numeric) The port of the node\n" | {RPCResult::Type::NUM_TIME, "time", | ||||
" }\n" | "The " + UNIX_EPOCH_TIME + | ||||
" ,....\n" | " of when the node was last seen"}, | ||||
"]\n"}, | {RPCResult::Type::NUM, "services", "The services offered"}, | ||||
{RPCResult::Type::STR, "address", | |||||
"The address of the node"}, | |||||
{RPCResult::Type::NUM, "port", "The port of the node"}, | |||||
}}, | |||||
}}, | |||||
RPCExamples{HelpExampleCli("getnodeaddresses", "8") + | RPCExamples{HelpExampleCli("getnodeaddresses", "8") + | ||||
HelpExampleRpc("getnodeaddresses", "8")}, | HelpExampleRpc("getnodeaddresses", "8")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
NodeContext &node = EnsureNodeContext(request.context); | NodeContext &node = EnsureNodeContext(request.context); | ||||
if (!node.banman) { | if (!node.banman) { | ||||
throw JSONRPCError( | throw JSONRPCError( | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |