fuel_core_sync::ports

Trait BlockImporterPort

Source
pub trait BlockImporterPort {
    // Required methods
    fn committed_height_stream(&self) -> BoxStream<BlockHeight>;
    fn execute_and_commit<'life0, 'async_trait>(
        &'life0 self,
        block: SealedBlock,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Port for communication with the block importer.

Required Methods§

Source

fn committed_height_stream(&self) -> BoxStream<BlockHeight>

Stream of newly committed block heights.

Source

fn execute_and_commit<'life0, 'async_trait>( &'life0 self, block: SealedBlock, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute the given sealed block and commit it to the database.

Implementors§