Trait mithril_common::chain_reader::ChainBlockReader

source ·
pub trait ChainBlockReader: Send + Sync {
    // Required methods
    fn set_chain_point<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        point: &'life1 RawCardanoPoint,
    ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_next_chain_block<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = StdResult<Option<ChainBlockNextAction>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The trait that reads events to either:

  • read next block on the chain
  • rollback to another point in case of rollback
  • do nothing when tip of the chain is reached

Required Methods§

source

fn set_chain_point<'life0, 'life1, 'async_trait>( &'life0 mut self, point: &'life1 RawCardanoPoint, ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Sets the chain point

source

fn get_next_chain_block<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = StdResult<Option<ChainBlockNextAction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the next chain block

Implementors§