aboutsummaryrefslogtreecommitdiff
path: root/src/zmq/zmqnotificationinterface.cpp
diff options
context:
space:
mode:
authorDaniel Kraft <[email protected]>2018-06-29 15:16:31 +0200
committerDaniel Kraft <[email protected]>2018-06-29 15:16:31 +0200
commitcaac39b0ace38aa088d88c1a5a9a9dbb4d2e893f (patch)
tree2d9ed99589f634d257f7c8fc644a2b9456785ba0 /src/zmq/zmqnotificationinterface.cpp
parentMerge #12686: Add -ftrapv to CFLAGS and CXXFLAGS when --enable-debug is used.... (diff)
downloaddiscoin-caac39b0ace38aa088d88c1a5a9a9dbb4d2e893f.tar.xz
discoin-caac39b0ace38aa088d88c1a5a9a9dbb4d2e893f.zip
Make ZMQ notification interface instance global.
This moves the used instance of CZMQNotificationInterface from a static variable in init.cpp to a globally-accessible one declared in zmq/zmqnotificationinterface.h. The variable is also renamed to g_zmq_notification_interface, to be consistent with other globals. We need this to implement a new RPC method "getzmqnotifications" (see https://github.com/bitcoin/bitcoin/issues/13526) in a follow up.
Diffstat (limited to 'src/zmq/zmqnotificationinterface.cpp')
-rw-r--r--src/zmq/zmqnotificationinterface.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/zmq/zmqnotificationinterface.cpp b/src/zmq/zmqnotificationinterface.cpp
index 68b425fa0..89ae62f4c 100644
--- a/src/zmq/zmqnotificationinterface.cpp
+++ b/src/zmq/zmqnotificationinterface.cpp
@@ -180,3 +180,5 @@ void CZMQNotificationInterface::BlockDisconnected(const std::shared_ptr<const CB
TransactionAddedToMempool(ptx);
}
}
+
+CZMQNotificationInterface* g_zmq_notification_interface = nullptr;