Fabcoin Core  0.16.2
P2P Digital Currency
zmqnotificationinterface.h
Go to the documentation of this file.
1 // Copyright (c) 2015-2017 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef FABCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H
6 #define FABCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H
7 
8 #include <validationinterface.h>
9 #include <string>
10 #include <map>
11 #include <list>
12 
13 class CBlockIndex;
15 
17 {
18 public:
20 
22 
23 protected:
24  bool Initialize();
25  void Shutdown();
26 
27  // CValidationInterface
28  void TransactionAddedToMempool(const CTransactionRef& tx) override;
29  void BlockConnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexConnected, const std::vector<CTransactionRef>& vtxConflicted) override;
30  void BlockDisconnected(const std::shared_ptr<const CBlock>& pblock) override;
31  void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override;
32 
33 private:
35 
36  void *pcontext;
37  std::list<CZMQAbstractNotifier*> notifiers;
38 };
39 
40 #endif // FABCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H
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:437
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:177