Changeset View
Changeset View
Standalone View
Standalone View
src/zmq/zmqrpc.cpp
Show All 14 Lines | |||||
UniValue getzmqnotifications(const Config &config, | UniValue getzmqnotifications(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"getzmqnotifications", | "getzmqnotifications", | ||||
"Returns information about the active ZeroMQ notifications.\n", | "Returns information about the active ZeroMQ notifications.\n", | ||||
{}, | {}, | ||||
RPCResult{ | RPCResult{ | ||||
"[\n" | RPCResult::Type::ARR, | ||||
" { (json object)\n" | "", | ||||
" \"type\": \"pubhashtx\", (string) Type of notification\n" | "", | ||||
" \"address\": \"...\" (string) Address of the publisher\n" | { | ||||
" \"hwm\": n (numeric) Outbound message high " | {RPCResult::Type::OBJ, | ||||
"water mark\n" | "", | ||||
" },\n" | "", | ||||
" ...\n" | { | ||||
"]\n"}, | {RPCResult::Type::STR, "type", "Type of notification"}, | ||||
{RPCResult::Type::STR, "address", | |||||
"Address of the publisher"}, | |||||
{RPCResult::Type::NUM, "hwm", | |||||
"Outbound message high water mark"}, | |||||
}}, | |||||
}}, | |||||
RPCExamples{HelpExampleCli("getzmqnotifications", "") + | RPCExamples{HelpExampleCli("getzmqnotifications", "") + | ||||
HelpExampleRpc("getzmqnotifications", "")}, | HelpExampleRpc("getzmqnotifications", "")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
UniValue result(UniValue::VARR); | UniValue result(UniValue::VARR); | ||||
if (g_zmq_notification_interface != nullptr) { | if (g_zmq_notification_interface != nullptr) { | ||||
for (const auto *n : | for (const auto *n : | ||||
Show All 27 Lines |