mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
rpc: Assert that RPCArg names are equal to CRPCCommand ones (zmq)
This commit is contained in:
parent
faaa46dc20
commit
fa32c1d5ec
1 changed files with 6 additions and 4 deletions
|
@ -13,9 +13,9 @@
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
UniValue getzmqnotifications(const JSONRPCRequest& request)
|
static RPCHelpMan getzmqnotifications()
|
||||||
{
|
{
|
||||||
RPCHelpMan{"getzmqnotifications",
|
return RPCHelpMan{"getzmqnotifications",
|
||||||
"\nReturns information about the active ZeroMQ notifications.\n",
|
"\nReturns information about the active ZeroMQ notifications.\n",
|
||||||
{},
|
{},
|
||||||
RPCResult{
|
RPCResult{
|
||||||
|
@ -33,8 +33,8 @@ UniValue getzmqnotifications(const JSONRPCRequest& request)
|
||||||
HelpExampleCli("getzmqnotifications", "")
|
HelpExampleCli("getzmqnotifications", "")
|
||||||
+ HelpExampleRpc("getzmqnotifications", "")
|
+ HelpExampleRpc("getzmqnotifications", "")
|
||||||
},
|
},
|
||||||
}.Check(request);
|
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||||
|
{
|
||||||
UniValue result(UniValue::VARR);
|
UniValue result(UniValue::VARR);
|
||||||
if (g_zmq_notification_interface != nullptr) {
|
if (g_zmq_notification_interface != nullptr) {
|
||||||
for (const auto* n : g_zmq_notification_interface->GetActiveNotifiers()) {
|
for (const auto* n : g_zmq_notification_interface->GetActiveNotifiers()) {
|
||||||
|
@ -47,6 +47,8 @@ UniValue getzmqnotifications(const JSONRPCRequest& request)
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
},
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const CRPCCommand commands[] =
|
const CRPCCommand commands[] =
|
||||||
|
|
Loading…
Add table
Reference in a new issue