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§
sourcefn get_block(
&self,
height: &BlockHeight
) -> StorageResult<Cow<'_, CompressedBlock>>
fn get_block( &self, height: &BlockHeight ) -> StorageResult<Cow<'_, CompressedBlock>>
Gets the committed block at the height
.
sourcefn block_header_merkle_root(
&self,
height: &BlockHeight
) -> StorageResult<Bytes32>
fn block_header_merkle_root( &self, height: &BlockHeight ) -> StorageResult<Bytes32>
Gets the block header BMT MMR root at height
.
sourcefn current_block_height(&self) -> StorageResult<BlockHeight>
fn current_block_height(&self) -> StorageResult<BlockHeight>
Fetch the current block height.