Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/misc.cpp
Show First 20 Lines • Show All 720 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static UniValue echo(const Config &config, const JSONRPCRequest &request) { | static UniValue echo(const Config &config, const JSONRPCRequest &request) { | ||||
if (request.fHelp) { | if (request.fHelp) { | ||||
throw std::runtime_error(RPCHelpMan{ | throw std::runtime_error(RPCHelpMan{ | ||||
"echo|echojson ...", | "echo|echojson ...", | ||||
"Simply echo back the input arguments. This command is for " | "Simply echo back the input arguments. This command is for " | ||||
"testing.\n" | "testing.\n" | ||||
"\nIt will return an internal bug report when " | |||||
"arg9='trigger_internal_bug' is passed.\n" | |||||
"\nThe difference between echo and echojson is that echojson has " | "\nThe difference between echo and echojson is that echojson has " | ||||
"argument conversion enabled in the client-side table in " | "argument conversion enabled in the client-side table in " | ||||
"bitcoin-cli and the GUI. There is no server-side difference.", | "bitcoin-cli and the GUI. There is no server-side difference.", | ||||
{}, | { | ||||
{"arg0", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, | |||||
""}, | |||||
{"arg1", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, | |||||
""}, | |||||
{"arg2", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, | |||||
""}, | |||||
{"arg3", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, | |||||
""}, | |||||
{"arg4", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, | |||||
""}, | |||||
{"arg5", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, | |||||
""}, | |||||
{"arg6", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, | |||||
""}, | |||||
{"arg7", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, | |||||
""}, | |||||
{"arg8", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, | |||||
""}, | |||||
{"arg9", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, | |||||
""}, | |||||
}, | |||||
RPCResult{RPCResult::Type::NONE, "", | RPCResult{RPCResult::Type::NONE, "", | ||||
"Returns whatever was passed in"}, | "Returns whatever was passed in"}, | ||||
RPCExamples{""}, | RPCExamples{""}, | ||||
} | } | ||||
.ToString()); | .ToString()); | ||||
} | } | ||||
CHECK_NONFATAL(request.params.size() != 100); | if (request.params[9].isStr()) { | ||||
CHECK_NONFATAL(request.params[9].get_str() != "trigger_internal_bug"); | |||||
} | |||||
return request.params; | return request.params; | ||||
} | } | ||||
static UniValue getcurrencyinfo(const Config &config, | static UniValue getcurrencyinfo(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"getcurrencyinfo", | "getcurrencyinfo", | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |