Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/misc.cpp
Show First 20 Lines • Show All 546 Lines • ▼ Show 20 Lines | if (request.fHelp) { | ||||
{}} | {}} | ||||
.ToString() + | .ToString() + | ||||
""); | ""); | ||||
} | } | ||||
return request.params; | return request.params; | ||||
} | } | ||||
static UniValue getinfo_deprecated(const Config &config, | |||||
const JSONRPCRequest &request) { | |||||
throw JSONRPCError(RPC_METHOD_NOT_FOUND, | |||||
"getinfo\n" | |||||
"\nThis call was removed in version 0.19.8. Use the " | |||||
"appropriate fields from:\n" | |||||
"- getblockchaininfo: blocks, difficulty, chain\n" | |||||
"- getnetworkinfo: version, protocolversion, " | |||||
"timeoffset, connections, proxy, relayfee, warnings\n" | |||||
"- getwalletinfo: balance, keypoololdest, keypoolsize, " | |||||
"paytxfee, unlocked_until, walletversion\n" | |||||
"\nbitcoin-cli has the option -getinfo to collect and " | |||||
"format these in the old format."); | |||||
} | |||||
// clang-format off | // clang-format off | ||||
static const ContextFreeRPCCommand commands[] = { | static const ContextFreeRPCCommand commands[] = { | ||||
// category name actor (function) argNames | // category name actor (function) argNames | ||||
// ------------------- ------------------------ ---------------------- ---------- | // ------------------- ------------------------ ---------------------- ---------- | ||||
{ "control", "getmemoryinfo", getmemoryinfo, {"mode"} }, | { "control", "getmemoryinfo", getmemoryinfo, {"mode"} }, | ||||
{ "control", "logging", logging, {"include", "exclude"} }, | { "control", "logging", logging, {"include", "exclude"} }, | ||||
{ "util", "validateaddress", validateaddress, {"address"} }, | { "util", "validateaddress", validateaddress, {"address"} }, | ||||
{ "util", "createmultisig", createmultisig, {"nrequired","keys"} }, | { "util", "createmultisig", createmultisig, {"nrequired","keys"} }, | ||||
{ "util", "verifymessage", verifymessage, {"address","signature","message"} }, | { "util", "verifymessage", verifymessage, {"address","signature","message"} }, | ||||
{ "util", "signmessagewithprivkey", signmessagewithprivkey, {"privkey","message"} }, | { "util", "signmessagewithprivkey", signmessagewithprivkey, {"privkey","message"} }, | ||||
/* Not shown in help */ | /* Not shown in help */ | ||||
{ "hidden", "setmocktime", setmocktime, {"timestamp"}}, | { "hidden", "setmocktime", setmocktime, {"timestamp"}}, | ||||
{ "hidden", "echo", echo, {"arg0","arg1","arg2","arg3","arg4","arg5","arg6","arg7","arg8","arg9"}}, | { "hidden", "echo", echo, {"arg0","arg1","arg2","arg3","arg4","arg5","arg6","arg7","arg8","arg9"}}, | ||||
{ "hidden", "echojson", echo, {"arg0","arg1","arg2","arg3","arg4","arg5","arg6","arg7","arg8","arg9"}}, | { "hidden", "echojson", echo, {"arg0","arg1","arg2","arg3","arg4","arg5","arg6","arg7","arg8","arg9"}}, | ||||
{ "hidden", "getinfo", getinfo_deprecated, {}}, | |||||
}; | }; | ||||
// clang-format on | // clang-format on | ||||
void RegisterMiscRPCCommands(CRPCTable &t) { | void RegisterMiscRPCCommands(CRPCTable &t) { | ||||
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) { | for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) { | ||||
t.appendCommand(commands[vcidx].name, &commands[vcidx]); | t.appendCommand(commands[vcidx].name, &commands[vcidx]); | ||||
} | } | ||||
} | } |