diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-04-01 02:55:59 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-09-24 19:53:52 +0200 |
commit | faaf9c58e4aa809019d4ca12747dd47411988e37 (patch) | |
tree | e0ae4c00f33104e0dba50a18b7505a2fbdbc10de /src/qt/test/rpcnestedtests.cpp | |
parent | fa19bb2cd8c575593583138a84e6bb3444d6196d (diff) |
remove CRPCCommand constructor that takes rpcfn_type function pointer
Diffstat (limited to 'src/qt/test/rpcnestedtests.cpp')
-rw-r--r-- | src/qt/test/rpcnestedtests.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/qt/test/rpcnestedtests.cpp b/src/qt/test/rpcnestedtests.cpp index e2b94223a2..ea7b5f0c9e 100644 --- a/src/qt/test/rpcnestedtests.cpp +++ b/src/qt/test/rpcnestedtests.cpp @@ -14,14 +14,26 @@ #include <QDir> #include <QtGlobal> -static UniValue rpcNestedTest_rpc(const JSONRPCRequest& request) +static RPCHelpMan rpcNestedTest_rpc() { - return request.params.write(0, 0); + return RPCHelpMan{ + "rpcNestedTest", + "echo the passed string(s)", + { + {"arg1", RPCArg::Type::STR, RPCArg::Optional::OMITTED, ""}, + {"arg2", RPCArg::Type::STR, RPCArg::Optional::OMITTED, ""}, + {"arg3", RPCArg::Type::STR, RPCArg::Optional::OMITTED, ""}, + }, + {}, + RPCExamples{""}, + [](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue { + return request.params.write(0, 0); + }, + }; } -static const CRPCCommand vRPCCommands[] = -{ - { "test", "rpcNestedTest", &rpcNestedTest_rpc, {} }, +static const CRPCCommand vRPCCommands[] = { + {"test", "rpcNestedTest", &rpcNestedTest_rpc, {"arg1", "arg2", "arg3"}}, }; void RPCNestedTests::rpcNestedTests() |