Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/avalanche.cpp
Show All 32 Lines | |||||
static UniValue addavalanchepeer(const Config &config, | static UniValue addavalanchepeer(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
if (request.fHelp || request.params.size() != 2) { | if (request.fHelp || request.params.size() != 2) { | ||||
throw std::runtime_error(RPCHelpMan{ | throw std::runtime_error(RPCHelpMan{ | ||||
"addavalanchepeer", | "addavalanchepeer", | ||||
"\nAdd a peer to the set of peer to poll for avalanche.\n", | "\nAdd a peer to the set of peer to poll for avalanche.\n", | ||||
{ | { | ||||
{"nodeid", RPCArg::Type::NUM, /* opt */ false, | {"nodeid", RPCArg::Type::NUM, RPCArg::Optional::NO, | ||||
/* default_value */ "", "Node to be added to avalanche."}, | "Node to be added to avalanche."}, | ||||
{"publickey", RPCArg::Type::STR_HEX, /* opt */ false, | {"publickey", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | ||||
/* default_value */ "", "The public key of the node."}, | "The public key of the node."}, | ||||
}, | }, | ||||
RPCResults{}, | RPCResults{}, | ||||
RPCExamples{HelpExampleRpc("addavalanchepeer", "5")}, | RPCExamples{HelpExampleRpc("addavalanchepeer", "5")}, | ||||
} | } | ||||
.ToString()); | .ToString()); | ||||
} | } | ||||
if (!g_avalanche) { | if (!g_avalanche) { | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |