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.
This commit is contained in:
Daniel Kraft
2018-06-29 15:16:31 +02:00
parent 2643fa5086
commit caac39b0ac
3 changed files with 11 additions and 11 deletions

View File

@@ -180,3 +180,5 @@ void CZMQNotificationInterface::BlockDisconnected(const std::shared_ptr<const CB
TransactionAddedToMempool(ptx);
}
}
CZMQNotificationInterface* g_zmq_notification_interface = nullptr;