aboutsummaryrefslogtreecommitdiff
path: root/src/zmq
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-08-14 11:30:55 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-08-14 12:37:51 +0200
commitfa32c1d5ec25bc53bf989a8ae68e688593d2859d (patch)
tree54141185729852f7fb3b2e9ffc2ef093c09b9fbd /src/zmq
parentfaaa46dc204d6d714f71dbc6f0bf02215dba0f0f (diff)
rpc: Assert that RPCArg names are equal to CRPCCommand ones (zmq)
Diffstat (limited to 'src/zmq')
-rw-r--r--src/zmq/zmqrpc.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/zmq/zmqrpc.cpp b/src/zmq/zmqrpc.cpp
index cce6210129..1dd751b493 100644
--- a/src/zmq/zmqrpc.cpp
+++ b/src/zmq/zmqrpc.cpp
@@ -13,9 +13,9 @@
namespace {
-UniValue getzmqnotifications(const JSONRPCRequest& request)
+static RPCHelpMan getzmqnotifications()
{
- RPCHelpMan{"getzmqnotifications",
+ return RPCHelpMan{"getzmqnotifications",
"\nReturns information about the active ZeroMQ notifications.\n",
{},
RPCResult{
@@ -33,8 +33,8 @@ UniValue getzmqnotifications(const JSONRPCRequest& request)
HelpExampleCli("getzmqnotifications", "")
+ HelpExampleRpc("getzmqnotifications", "")
},
- }.Check(request);
-
+ [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
+{
UniValue result(UniValue::VARR);
if (g_zmq_notification_interface != nullptr) {
for (const auto* n : g_zmq_notification_interface->GetActiveNotifiers()) {
@@ -47,6 +47,8 @@ UniValue getzmqnotifications(const JSONRPCRequest& request)
}
return result;
+},
+ };
}
const CRPCCommand commands[] =