diff options
Diffstat (limited to 'src/zmq/zmqnotificationinterface.h')
-rw-r--r-- | src/zmq/zmqnotificationinterface.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/zmq/zmqnotificationinterface.h b/src/zmq/zmqnotificationinterface.h index a43f9bfef3..ce67633b30 100644 --- a/src/zmq/zmqnotificationinterface.h +++ b/src/zmq/zmqnotificationinterface.h @@ -9,6 +9,7 @@ #include <validationinterface.h> #include <cstdint> +#include <functional> #include <list> #include <memory> @@ -23,7 +24,7 @@ public: std::list<const CZMQAbstractNotifier*> GetActiveNotifiers() const; - static CZMQNotificationInterface* Create(); + static std::unique_ptr<CZMQNotificationInterface> Create(std::function<bool(CBlock&, const CBlockIndex&)> get_block_by_index); protected: bool Initialize(); @@ -43,6 +44,6 @@ private: std::list<std::unique_ptr<CZMQAbstractNotifier>> notifiers; }; -extern CZMQNotificationInterface* g_zmq_notification_interface; +extern std::unique_ptr<CZMQNotificationInterface> g_zmq_notification_interface; #endif // BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H |