pub struct ZMQNotificationInterface { /* private fields */ }
Implementations§
source§impl ZMQNotificationInterface
impl ZMQNotificationInterface
pub fn get_active_notifiers(&self) -> LinkedList<*const ZMQAbstractNotifier>
pub fn create(&mut self) -> *mut ZMQNotificationInterface
Trait Implementations§
source§impl BlockChecked for ZMQNotificationInterface
impl BlockChecked for ZMQNotificationInterface
source§fn block_checked(self: Arc<Self>, _0: &Block, _1: &BlockValidationState)
fn block_checked(self: Arc<Self>, _0: &Block, _1: &BlockValidationState)
| 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)
|
source§impl BlockConnected for ZMQNotificationInterface
impl BlockConnected for ZMQNotificationInterface
source§fn block_connected(
&mut self,
pblock: Arc<Block>,
pindex_connected: Arc<BlockIndex>
)
fn block_connected( &mut self, pblock: Arc<Block>, pindex_connected: Arc<BlockIndex> )
| Notifies listeners of a block being
| connected.
|
| Provides a vector of transactions evicted
| from the mempool as a result.
|
| Called on a background thread.
|
source§impl BlockDisconnected for ZMQNotificationInterface
impl BlockDisconnected for ZMQNotificationInterface
source§fn block_disconnected(
&mut self,
pblock: Arc<Block>,
pindex_disconnected: Arc<BlockIndex>
)
fn block_disconnected( &mut self, pblock: Arc<Block>, pindex_disconnected: Arc<BlockIndex> )
| Notifies listeners of a block being
| disconnected
|
| Called on a background thread.
|
source§impl ChainStateFlushed for ZMQNotificationInterface
impl ChainStateFlushed for ZMQNotificationInterface
source§fn chain_state_flushed(&mut self, locator: &BlockLocator)
fn chain_state_flushed(&mut self, locator: &BlockLocator)
| Notifies listeners of the new active
| block chain on-disk.
|
| Prior to this callback, any updates
| are not guaranteed to persist on disk
| (ie clients need to handle shutdown/restart
| safety by being able to understand when
| some updates were lost due to unclean
| shutdown).
|
| When this callback is invoked, the validation
| changes done by any prior callback are
| guaranteed to exist on disk and survive
| a restart, including an unclean shutdown.
|
| Provides a locator describing the best
| chain, which is likely useful for storing
| current state on disk in client DBs.
|
| Called on a background thread.
|
source§impl Default for ZMQNotificationInterface
impl Default for ZMQNotificationInterface
source§impl Drop for ZMQNotificationInterface
impl Drop for ZMQNotificationInterface
source§impl NewPoWValidBlock for ZMQNotificationInterface
impl NewPoWValidBlock for ZMQNotificationInterface
source§fn new_pow_valid_block(&mut self, pindex: Arc<BlockIndex>, block: &Arc<Block>)
fn new_pow_valid_block(&mut self, pindex: Arc<BlockIndex>, block: &Arc<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
|
source§impl Shutdown for ZMQNotificationInterface
impl Shutdown for ZMQNotificationInterface
source§impl TransactionAddedToMempool for ZMQNotificationInterface
impl TransactionAddedToMempool for ZMQNotificationInterface
source§fn transaction_added_to_mempool(
&mut self,
ptx: &TransactionRef,
mempool_sequence: u64
)
fn transaction_added_to_mempool( &mut self, ptx: &TransactionRef, mempool_sequence: u64 )
| Notifies listeners of a transaction
| having been added to mempool.
|
| Called on a background thread.
|
source§impl TransactionRemovedFromMempool for ZMQNotificationInterface
impl TransactionRemovedFromMempool for ZMQNotificationInterface
source§fn transaction_removed_from_mempool(
&mut self,
ptx: &TransactionRef,
reason: MemPoolRemovalReason,
mempool_sequence: u64
)
fn transaction_removed_from_mempool( &mut self, ptx: &TransactionRef, reason: MemPoolRemovalReason, mempool_sequence: u64 )
| Notifies listeners of a transaction
| leaving mempool.
|
| This notification fires for transactions
| that are removed from the mempool for
| the following reasons:
|
| - EXPIRY (expired from mempool after
| -mempoolexpiry hours)
|
| - SIZELIMIT (removed in size limiting
| if the mempool exceeds -maxmempool
| megabytes)
|
| - REORG (removed during a reorg)
|
| - CONFLICT (removed because it conflicts
| with in-block transaction)
|
| - REPLACED (removed due to RBF replacement)
|
| This does not fire for transactions
| that are removed from the mempool because
| they have been included in a block. Any
| client that is interested in transactions
| removed from the mempool for inclusion
| in a block can learn about those transactions
| from the BlockConnected notification.
|
| Transactions that are removed from
| the mempool because they conflict with
| a transaction in the new block will have
|
| TransactionRemovedFromMempool events
| fired before the BlockConnected
| event is fired. If multiple blocks are
| connected in one step, then the ordering
| could be:
|
| - TransactionRemovedFromMempool(tx1
| from block A)
|
| - TransactionRemovedFromMempool(tx2
| from block A)
|
| - TransactionRemovedFromMempool(tx1
| from block B)
|
| - TransactionRemovedFromMempool(tx2
| from block B)
|
| - BlockConnected(A)
|
| - BlockConnected(B)
|
| Called on a background thread.
|
source§impl UpdatedBlockTip for ZMQNotificationInterface
impl UpdatedBlockTip for ZMQNotificationInterface
source§fn updated_block_tip(
&mut self,
pindex_new: Option<Arc<BlockIndex>>,
pindex_fork: Option<Arc<BlockIndex>>,
initial_download: bool
)
fn updated_block_tip( &mut self, pindex_new: Option<Arc<BlockIndex>>, pindex_fork: Option<Arc<BlockIndex>>, initial_download: bool )
| 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.
|
impl ValidationInterface for ZMQNotificationInterface
Auto Trait Implementations§
impl RefUnwindSafe for ZMQNotificationInterface
impl !Send for ZMQNotificationInterface
impl !Sync for ZMQNotificationInterface
impl Unpin for ZMQNotificationInterface
impl UnwindSafe for ZMQNotificationInterface
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more