Skip to content

Commit fa32c1d

Browse files
author
MarcoFalke
committed
rpc: Assert that RPCArg names are equal to CRPCCommand ones (zmq)
1 parent faaa46d commit fa32c1d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/zmq/zmqrpc.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
namespace {
1515

16-
UniValue getzmqnotifications(const JSONRPCRequest& request)
16+
static RPCHelpMan getzmqnotifications()
1717
{
18-
RPCHelpMan{"getzmqnotifications",
18+
return RPCHelpMan{"getzmqnotifications",
1919
"\nReturns information about the active ZeroMQ notifications.\n",
2020
{},
2121
RPCResult{
@@ -33,8 +33,8 @@ UniValue getzmqnotifications(const JSONRPCRequest& request)
3333
HelpExampleCli("getzmqnotifications", "")
3434
+ HelpExampleRpc("getzmqnotifications", "")
3535
},
36-
}.Check(request);
37-
36+
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
37+
{
3838
UniValue result(UniValue::VARR);
3939
if (g_zmq_notification_interface != nullptr) {
4040
for (const auto* n : g_zmq_notification_interface->GetActiveNotifiers()) {
@@ -47,6 +47,8 @@ UniValue getzmqnotifications(const JSONRPCRequest& request)
4747
}
4848

4949
return result;
50+
},
51+
};
5052
}
5153

5254
const CRPCCommand commands[] =

0 commit comments

Comments
 (0)