mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
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:
@@ -180,3 +180,5 @@ void CZMQNotificationInterface::BlockDisconnected(const std::shared_ptr<const CB
|
||||
TransactionAddedToMempool(ptx);
|
||||
}
|
||||
}
|
||||
|
||||
CZMQNotificationInterface* g_zmq_notification_interface = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user