CValidationInterface

Implement this to subscribe to events generated in validation and mempool

Synopsis

Declared in <validationinterface.h>

class CValidationInterface;

Description

Each CValidationInterface() subscriber will receive event callbacks in the order in which the events were generated by validation and mempool. Furthermore, each ValidationInterface() subscriber may assume that callbacks effectively run in a single thread with single-threaded memory consistency. That is, for a given ValidationInterface() instantiation, each callback will complete before the next one is invoked. This means, for example when a block is connected that the UpdatedBlockTip() callback may depend on an operation performed in the BlockConnected() callback without worrying about explicit synchronization. No ordering should be assumed across ValidationInterface() subscribers.

Protected Member Functions

NameDescription
~CValidationInterface [destructor]Protected destructor so that instances can only be deleted by derived classes. If that restriction is no longer desired, this should be made public and virtual.
ActiveTipChange [virtual]Notifies listeners any time the block chain tip changes, synchronously.
BlockChecked [virtual]Notifies listeners of a block validation result. If the provided BlockValidationState IsValid, the provided block is guaranteed to be the current best block at the time the callback was generated (not necessarily now).
BlockConnected [virtual]Notifies listeners of a block being connected.
BlockDisconnected [virtual]Notifies listeners of a block being disconnected Provides the block that was disconnected.
ChainStateFlushed [virtual]Notifies listeners of the new active block chain on-disk.
MempoolTransactionsRemovedForBlock [virtual]Notifies listeners of transactions removed from the mempool as as a result of new block being connected. MempoolTransactionsRemovedForBlock will be fired before BlockConnected.
NewPoWValidBlock [virtual]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.
TransactionAddedToMempool [virtual]Notifies listeners of a transaction having been added to mempool.
TransactionRemovedFromMempool [virtual]Notifies listeners of a transaction leaving mempool.
UpdatedBlockTip [virtual]Notifies listeners when the block chain tip advances.

Friends

NameDescription
ValidationInterfaceTestTest fixture granted access to the interface's protected callbacks.
ValidationSignalsDispatches validation event notifications to registered subscribers.

Derived Classes

NameDescription
BaseIndex Base class for the node's optional block-chain indexes.
CZMQNotificationInterface Validation-interface listener that fans node events out to the configured ZMQ notifiers.
FeeRateEstimatorManager Tracks fee-rate estimates derived from observed transactions.
PeerManager Drives the peer-to-peer message processing and relay logic for a node.