Trait fuel_core_interfaces::relayer::RelayerDb
source · pub trait RelayerDb: StorageMutate<Messages, Error = KvStoreError> + Send + Sync {
fn get_chain_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = BlockHeight> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait;
fn get_sealed_block<'life0, 'async_trait>(
&'life0 self,
height: BlockHeight
) -> Pin<Box<dyn Future<Output = Option<Arc<SealedFuelBlock>>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait;
fn set_finalized_da_height<'life0, 'async_trait>(
&'life0 self,
block: DaBlockHeight
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait;
fn get_finalized_da_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<DaBlockHeight>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait;
fn get_last_published_fuel_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<BlockHeight>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait;
fn set_last_published_fuel_height<'life0, 'async_trait>(
&'life0 self,
block_height: BlockHeight
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait;
fn insert_message<'life0, 'life1, 'async_trait>(
&'life0 mut self,
message: &'life1 CheckedMessage
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
{ ... }
}
Required Methods§
sourcefn get_chain_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = BlockHeight> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_chain_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = BlockHeight> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
current best block number
fn get_sealed_block<'life0, 'async_trait>(
&'life0 self,
height: BlockHeight
) -> Pin<Box<dyn Future<Output = Option<Arc<SealedFuelBlock>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
sourcefn set_finalized_da_height<'life0, 'async_trait>(
&'life0 self,
block: DaBlockHeight
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_finalized_da_height<'life0, 'async_trait>(
&'life0 self,
block: DaBlockHeight
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
set finalized da height that represent last block from da layer that got finalized.
sourcefn get_finalized_da_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<DaBlockHeight>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_finalized_da_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<DaBlockHeight>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Assume it is always set as initialization of database.
sourcefn get_last_published_fuel_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<BlockHeight>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_last_published_fuel_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<BlockHeight>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the last fuel block height that was published to the da layer.
sourcefn set_last_published_fuel_height<'life0, 'async_trait>(
&'life0 self,
block_height: BlockHeight
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_last_published_fuel_height<'life0, 'async_trait>(
&'life0 self,
block_height: BlockHeight
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Set the last fuel block height that was published to the da layer.
Provided Methods§
sourcefn insert_message<'life0, 'life1, 'async_trait>(
&'life0 mut self,
message: &'life1 CheckedMessage
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_message<'life0, 'life1, 'async_trait>(
&'life0 mut self,
message: &'life1 CheckedMessage
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Add bridge message to database. Messages are not revertible.