Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/misc.cpp
Show All 11 Lines | |||||
#include <logging.h> | #include <logging.h> | ||||
#include <net.h> | #include <net.h> | ||||
#include <netbase.h> | #include <netbase.h> | ||||
#include <outputtype.h> | #include <outputtype.h> | ||||
#include <rpc/blockchain.h> | #include <rpc/blockchain.h> | ||||
#include <rpc/server.h> | #include <rpc/server.h> | ||||
#include <rpc/util.h> | #include <rpc/util.h> | ||||
#include <timedata.h> | #include <timedata.h> | ||||
#include <util/check.h> | |||||
#include <util/strencodings.h> | #include <util/strencodings.h> | ||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
#include <warnings.h> | #include <warnings.h> | ||||
#include <univalue.h> | #include <univalue.h> | ||||
#include <cstdint> | #include <cstdint> | ||||
▲ Show 20 Lines • Show All 515 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( | throw std::runtime_error( | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"echo|echojson ...", | "echo|echojson ...", | ||||
"\nSimply echo back the input arguments. This command is for " | "\nSimply echo back the input arguments. This command is for " | ||||
"testing.\n" | "testing.\n" | ||||
"\nIt will return an internal bug report when exactly 100 " | |||||
"arguments are passed.\n" | |||||
"\nThe difference between echo and echojson is that echojson " | "\nThe difference between echo and echojson is that echojson " | ||||
"has argument conversion enabled in the client-side table in " | "has 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.", | ||||
{}} | {}} | ||||
.ToString() + | .ToString() + | ||||
""); | ""); | ||||
} | } | ||||
CHECK_NONFATAL(request.params.size() != 100); | |||||
return request.params; | return request.params; | ||||
} | } | ||||
// 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"} }, | ||||
Show All 17 Lines |