5#ifndef BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H
6#define BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H
29 static std::unique_ptr<CZMQNotificationInterface>
Create(std::function<
bool(std::vector<uint8_t>&,
const CBlockIndex&)> get_block_by_index);
46 std::list<std::unique_ptr<CZMQAbstractNotifier>>
notifiers;
The block chain is a tree shaped structure starting with the genesis block at the root,...
Implement this to subscribe to events generated in validation and mempool.
static std::unique_ptr< CZMQNotificationInterface > Create(std::function< bool(std::vector< uint8_t > &, const CBlockIndex &)> get_block_by_index)
void TransactionAddedToMempool(const NewMempoolTransactionInfo &tx, uint64_t mempool_sequence) override
Notifies listeners of a transaction having been added to mempool.
virtual ~CZMQNotificationInterface()
void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override
Notifies listeners when the block chain tip advances.
std::list< std::unique_ptr< CZMQAbstractNotifier > > notifiers
void BlockDisconnected(const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindexDisconnected) override
Notifies listeners of a block being disconnected Provides the block that was disconnected.
CZMQNotificationInterface()
void BlockConnected(ChainstateRole role, const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindexConnected) override
Notifies listeners of a block being connected.
void TransactionRemovedFromMempool(const CTransactionRef &tx, MemPoolRemovalReason reason, uint64_t mempool_sequence) override
Notifies listeners of a transaction leaving mempool.
std::list< const CZMQAbstractNotifier * > GetActiveNotifiers() const
ChainstateRole
This enum describes the various roles a specific Chainstate instance can take.
MemPoolRemovalReason
Reason why a transaction was removed from the mempool, this is passed to the notification signal.
std::shared_ptr< const CTransaction > CTransactionRef
std::unique_ptr< CZMQNotificationInterface > g_zmq_notification_interface