Trait BlockImporterPort

Source
pub trait BlockImporterPort {
    // Required methods
    fn committed_height_stream(&self) -> BoxStream<BlockHeight>;
    fn execute_and_commit(
        &self,
        block: SealedBlock,
    ) -> impl Future<Output = Result<()>> + Send;
}
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( &self, block: SealedBlock, ) -> impl Future<Output = Result<()>> + Send

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§