Bitcoin Core  0.15.99
P2P Digital Currency
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
CZMQNotificationInterface Class Referencefinal

#include <zmqnotificationinterface.h>

Inheritance diagram for CZMQNotificationInterface:
[legend]
Collaboration diagram for CZMQNotificationInterface:
[legend]

Public Member Functions

virtual ~CZMQNotificationInterface ()
 
std::list< const CZMQAbstractNotifier * > GetActiveNotifiers () const
 

Static Public Member Functions

static CZMQNotificationInterfaceCreate ()
 

Protected Member Functions

bool Initialize ()
 
void Shutdown ()
 
void TransactionAddedToMempool (const CTransactionRef &tx) override
 Notifies listeners of a transaction having been added to mempool. More...
 
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. More...
 
void BlockDisconnected (const std::shared_ptr< const CBlock > &pblock) override
 Notifies listeners of a block being disconnected. More...
 
void UpdatedBlockTip (const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override
 Notifies listeners when the block chain tip advances. More...
 
- Protected Member Functions inherited from CValidationInterface
 ~CValidationInterface ()=default
 Protected destructor so that instances can only be deleted by derived classes. More...
 
virtual void TransactionRemovedFromMempool (const CTransactionRef &ptx)
 Notifies listeners of a transaction leaving mempool. More...
 
virtual void ChainStateFlushed (const CBlockLocator &locator)
 Notifies listeners of the new active block chain on-disk. More...
 
virtual void ResendWalletTransactions (int64_t nBestBlockTime, CConnman *connman)
 Tells listeners to broadcast their data. More...
 
virtual void BlockChecked (const CBlock &, const CValidationState &)
 Notifies listeners of a block validation result. More...
 
virtual void NewPoWValidBlock (const CBlockIndex *pindex, const std::shared_ptr< const CBlock > &block)
 Notifies listeners that a block which builds directly on our current tip has been received and connected to the headers tree, though not validated yet. More...
 
friend void::RegisterValidationInterface (CValidationInterface *)
 
friend void::UnregisterValidationInterface (CValidationInterface *)
 
friend void::UnregisterAllValidationInterfaces ()
 

Private Member Functions

 CZMQNotificationInterface ()
 

Private Attributes

void * pcontext
 
std::list< CZMQAbstractNotifier * > notifiers
 

Detailed Description

Definition at line 16 of file zmqnotificationinterface.h.

Constructor & Destructor Documentation

CZMQNotificationInterface::~CZMQNotificationInterface ( )
virtual

Definition at line 22 of file zmqnotificationinterface.cpp.

Here is the call graph for this function:

CZMQNotificationInterface::CZMQNotificationInterface ( )
private

Definition at line 18 of file zmqnotificationinterface.cpp.

Here is the caller graph for this function:

Member Function Documentation

void CZMQNotificationInterface::BlockConnected ( const std::shared_ptr< const CBlock > &  block,
const CBlockIndex pindex,
const std::vector< CTransactionRef > &  txnConflicted 
)
overrideprotectedvirtual

Notifies listeners of a block being connected.

Provides a vector of transactions evicted from the mempool as a result.

Called on a background thread.

Reimplemented from CValidationInterface.

Definition at line 177 of file zmqnotificationinterface.cpp.

Here is the call graph for this function:

void CZMQNotificationInterface::BlockDisconnected ( const std::shared_ptr< const CBlock > &  block)
overrideprotectedvirtual

Notifies listeners of a block being disconnected.

Called on a background thread.

Reimplemented from CValidationInterface.

Definition at line 185 of file zmqnotificationinterface.cpp.

Here is the call graph for this function:

CZMQNotificationInterface * CZMQNotificationInterface::Create ( )
static

Definition at line 41 of file zmqnotificationinterface.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::list< const CZMQAbstractNotifier * > CZMQNotificationInterface::GetActiveNotifiers ( ) const

Definition at line 32 of file zmqnotificationinterface.cpp.

bool CZMQNotificationInterface::Initialize ( )
protected

Definition at line 82 of file zmqnotificationinterface.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CZMQNotificationInterface::Shutdown ( )
protected

Definition at line 119 of file zmqnotificationinterface.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CZMQNotificationInterface::TransactionAddedToMempool ( const CTransactionRef ptxn)
overrideprotectedvirtual

Notifies listeners of a transaction having been added to mempool.

Called on a background thread.

Reimplemented from CValidationInterface.

Definition at line 156 of file zmqnotificationinterface.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CZMQNotificationInterface::UpdatedBlockTip ( const CBlockIndex pindexNew,
const CBlockIndex pindexFork,
bool  fInitialDownload 
)
overrideprotectedvirtual

Notifies listeners when the block chain tip advances.

When multiple blocks are connected at once, UpdatedBlockTip will be called on the final tip but may not be called on every intermediate tip. If the latter behavior is desired, subscribe to BlockConnected() instead.

Called on a background thread.

Reimplemented from CValidationInterface.

Definition at line 136 of file zmqnotificationinterface.cpp.

Here is the call graph for this function:

Member Data Documentation

std::list<CZMQAbstractNotifier*> CZMQNotificationInterface::notifiers
private

Definition at line 39 of file zmqnotificationinterface.h.

void* CZMQNotificationInterface::pcontext
private

Definition at line 38 of file zmqnotificationinterface.h.


The documentation for this class was generated from the following files: