aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorDaniel Kraft <[email protected]>2018-06-29 16:10:01 +0200
committerDaniel Kraft <[email protected]>2018-07-05 08:02:22 +0200
commit161e8d40a4e4c0e701b6c8142b8dcacf2190545e (patch)
tree1a897ac73c6e7c6d60b0f46f9624481f1b854af3 /src/init.cpp
parentMake ZMQ notification interface instance global. (diff)
downloaddiscoin-161e8d40a4e4c0e701b6c8142b8dcacf2190545e.tar.xz
discoin-161e8d40a4e4c0e701b6c8142b8dcacf2190545e.zip
RPC: Add new getzmqnotifications method.
This adds a new RPC method "getzmqnotifications", which returns information about all active ZMQ notification endpoints. This is useful for software that layers on top of bitcoind, so it can verify that ZeroMQ is enabled and also figure out where it should listen. See https://github.com/bitcoin/bitcoin/issues/13526.
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 299b478e8..79f1ba91b 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -62,6 +62,7 @@
#if ENABLE_ZMQ
#include <zmq/zmqnotificationinterface.h>
+#include <zmq/zmqrpc.h>
#endif
bool fFeeEstimatesInitialized = false;
@@ -1287,6 +1288,9 @@ bool AppInitMain()
*/
RegisterAllCoreRPCCommands(tableRPC);
g_wallet_init_interface.RegisterRPC(tableRPC);
+#if ENABLE_ZMQ
+ RegisterZMQRPCCommands(tableRPC);
+#endif
/* Start the RPC server already. It will be started in "warmup" mode
* and not really process calls already (but it will signify connections