mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
rpc: Add 'echo' call for testing
This hidden call simply returns what is passed in.
This commit is contained in:
parent
495eb44a4f
commit
286ec08cb0
@ -492,6 +492,17 @@ UniValue getmemoryinfo(const JSONRPCRequest& request)
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UniValue echo(const JSONRPCRequest& request)
|
||||||
|
{
|
||||||
|
if (request.fHelp)
|
||||||
|
throw runtime_error(
|
||||||
|
"echo \"message\" ...\n"
|
||||||
|
"\nSimply echo back the input arguments\n"
|
||||||
|
);
|
||||||
|
|
||||||
|
return request.params;
|
||||||
|
}
|
||||||
|
|
||||||
static const CRPCCommand commands[] =
|
static const CRPCCommand commands[] =
|
||||||
{ // category name actor (function) okSafeMode
|
{ // category name actor (function) okSafeMode
|
||||||
// --------------------- ------------------------ ----------------------- ----------
|
// --------------------- ------------------------ ----------------------- ----------
|
||||||
@ -504,6 +515,7 @@ static const CRPCCommand commands[] =
|
|||||||
|
|
||||||
/* Not shown in help */
|
/* Not shown in help */
|
||||||
{ "hidden", "setmocktime", &setmocktime, true },
|
{ "hidden", "setmocktime", &setmocktime, true },
|
||||||
|
{ "hidden", "echo", &echo, true, {"arg0","arg1","arg2","arg3","arg4","arg5","arg6","arg7","arg8","arg9"}},
|
||||||
};
|
};
|
||||||
|
|
||||||
void RegisterMiscRPCCommands(CRPCTable &t)
|
void RegisterMiscRPCCommands(CRPCTable &t)
|
||||||
|
Loading…
Reference in New Issue
Block a user