pub trait BlockProducerDatabase: Send + Sync {
    // Required methods
    fn get_block(
        &self,
        height: &BlockHeight
    ) -> StorageResult<Cow<'_, CompressedBlock>>;
    fn block_header_merkle_root(
        &self,
        height: &BlockHeight
    ) -> StorageResult<Bytes32>;
    fn current_block_height(&self) -> StorageResult<BlockHeight>;
}

Required Methods§

source

fn get_block( &self, height: &BlockHeight ) -> StorageResult<Cow<'_, CompressedBlock>>

Gets the committed block at the height.

source

fn block_header_merkle_root( &self, height: &BlockHeight ) -> StorageResult<Bytes32>

Gets the block header BMT MMR root at height.

source

fn current_block_height(&self) -> StorageResult<BlockHeight>

Fetch the current block height.

Implementors§