Trait fuel_core_relayer::ports::RelayerDb
source · pub trait RelayerDb: Send + Sync {
// Required methods
fn insert_messages(
&mut self,
da_height: &DaBlockHeight,
messages: &[CheckedMessage]
) -> StorageResult<()>;
fn set_finalized_da_height_to_at_least(
&mut self,
block: &DaBlockHeight
) -> StorageResult<()>;
fn get_finalized_da_height(&self) -> StorageResult<DaBlockHeight>;
}
Expand description
Manages state related to supported external chains.
Required Methods§
sourcefn insert_messages(
&mut self,
da_height: &DaBlockHeight,
messages: &[CheckedMessage]
) -> StorageResult<()>
fn insert_messages( &mut self, da_height: &DaBlockHeight, messages: &[CheckedMessage] ) -> StorageResult<()>
Add bridge messages to database. Messages are not revertible. Must only set a new da height if it is greater than the current.
sourcefn set_finalized_da_height_to_at_least(
&mut self,
block: &DaBlockHeight
) -> StorageResult<()>
fn set_finalized_da_height_to_at_least( &mut self, block: &DaBlockHeight ) -> StorageResult<()>
Set finalized da height that represent last block from da layer that got finalized. This will only set the value if it is greater than the current.
sourcefn get_finalized_da_height(&self) -> StorageResult<DaBlockHeight>
fn get_finalized_da_height(&self) -> StorageResult<DaBlockHeight>
Get finalized da height that represent last block from da layer that got finalized. Panics if height is not set as of initialization of database.