pub struct NotificationsProxy { /* private fields */ }
Trait Implementations§
source§impl BlockChecked for NotificationsProxy
impl BlockChecked for NotificationsProxy
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 NotificationsProxy
impl BlockConnected for NotificationsProxy
source§fn block_connected(&mut self, block: Arc<Block>, index: Arc<BlockIndex>)
fn block_connected(&mut self, block: Arc<Block>, index: 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 NotificationsProxy
impl BlockDisconnected for NotificationsProxy
source§fn block_disconnected(&mut self, block: Arc<Block>, index: Arc<BlockIndex>)
fn block_disconnected(&mut self, block: Arc<Block>, index: Arc<BlockIndex>)
| Notifies listeners of a block being
| disconnected
|
| Called on a background thread.
|
source§impl ChainStateFlushed for NotificationsProxy
impl ChainStateFlushed for NotificationsProxy
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 From<Arc<dyn ChainNotifications + 'static>> for NotificationsProxy
impl From<Arc<dyn ChainNotifications + 'static>> for NotificationsProxy
source§fn from(notifications: Arc<dyn ChainNotifications>) -> Self
fn from(notifications: Arc<dyn ChainNotifications>) -> Self
Converts to this type from the input type.
source§impl NewPoWValidBlock for NotificationsProxy
impl NewPoWValidBlock for NotificationsProxy
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 TransactionAddedToMempool for NotificationsProxy
impl TransactionAddedToMempool for NotificationsProxy
source§fn transaction_added_to_mempool(
&mut self,
tx: &TransactionRef,
mempool_sequence: u64
)
fn transaction_added_to_mempool( &mut self, tx: &TransactionRef, mempool_sequence: u64 )
| Notifies listeners of a transaction
| having been added to mempool.
|
| Called on a background thread.
|
source§impl TransactionRemovedFromMempool for NotificationsProxy
impl TransactionRemovedFromMempool for NotificationsProxy
source§fn transaction_removed_from_mempool(
&mut self,
tx: &TransactionRef,
reason: MemPoolRemovalReason,
mempool_sequence: u64
)
fn transaction_removed_from_mempool( &mut self, tx: &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 NotificationsProxy
impl UpdatedBlockTip for NotificationsProxy
source§fn updated_block_tip(
&mut self,
index: Option<Arc<BlockIndex>>,
fork_index: Option<Arc<BlockIndex>>,
is_ibd: bool
)
fn updated_block_tip( &mut self, index: Option<Arc<BlockIndex>>, fork_index: Option<Arc<BlockIndex>>, is_ibd: 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 NotificationsProxy
Auto Trait Implementations§
impl !RefUnwindSafe for NotificationsProxy
impl !Send for NotificationsProxy
impl !Sync for NotificationsProxy
impl Unpin for NotificationsProxy
impl !UnwindSafe for NotificationsProxy
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