Raven Core  3.0.0
P2P Digital Currency
zmqnotificationinterface.h
Go to the documentation of this file.
1 // Copyright (c) 2015-2016 The Bitcoin Core developers
2 // Copyright (c) 2017-2019 The Raven Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef RAVEN_ZMQ_ZMQNOTIFICATIONINTERFACE_H
7 #define RAVEN_ZMQ_ZMQNOTIFICATIONINTERFACE_H
8 
9 #include "validationinterface.h"
10 #include <string>
11 #include <map>
12 #include <list>
13 
14 class CBlockIndex;
16 
18 {
19 public:
21 
23 
24 protected:
25  bool Initialize();
26  void Shutdown();
27 
28  // CValidationInterface
29  void TransactionAddedToMempool(const CTransactionRef& tx) override;
30  void BlockConnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexConnected, const std::vector<CTransactionRef>& vtxConflicted) override;
31  void BlockDisconnected(const std::shared_ptr<const CBlock>& pblock) override;
32  void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override;
33  void NewAssetMessage(const CMessage& message) override;
34 
35 private:
37 
38  void *pcontext;
39  std::list<CZMQAbstractNotifier*> notifiers;
40 };
41 
42 #endif // RAVEN_ZMQ_ZMQNOTIFICATIONINTERFACE_H
void NewAssetMessage(const CMessage &message) override
void TransactionAddedToMempool(const CTransactionRef &tx) override
Notifies listeners of a transaction having been added to mempool.
void BlockConnected(const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindexConnected, const std::vector< CTransactionRef > &vtxConflicted) override
Notifies listeners of a block being connected.
std::shared_ptr< const CTransaction > CTransactionRef
Definition: transaction.h:436
static CZMQNotificationInterface * Create()
void BlockDisconnected(const std::shared_ptr< const CBlock > &pblock) override
Notifies listeners of a block being disconnected.
void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override
Notifies listeners of updated block chain tip.
std::list< CZMQAbstractNotifier * > notifiers
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:172