Trait fuel_core_relayer::ports::RelayerDb
source · pub trait RelayerDb: Send + Sync {
// Required methods
fn insert_events(
&mut self,
da_height: &DaBlockHeight,
events: &[Event],
) -> StorageResult<()>;
fn get_finalized_da_height(&self) -> Option<DaBlockHeight>;
}
Expand description
Manages state related to supported external chains.
Required Methods§
sourcefn insert_events(
&mut self,
da_height: &DaBlockHeight,
events: &[Event],
) -> StorageResult<()>
fn insert_events( &mut self, da_height: &DaBlockHeight, events: &[Event], ) -> StorageResult<()>
Add bridge events to database. Events are not revertible. Must only set a new da height if it is greater than the current.
sourcefn get_finalized_da_height(&self) -> Option<DaBlockHeight>
fn get_finalized_da_height(&self) -> Option<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.