use crate::database::database_description::DatabaseDescription;
use fuel_core_storage::kv_store::StorageColumn;
use fuel_core_types::blockchain::primitives::DaBlockHeight;
#[derive(
Debug,
Copy,
Clone,
strum_macros::EnumCount,
strum_macros::IntoStaticStr,
PartialEq,
Eq,
enum_iterator::Sequence,
Hash,
)]
pub enum DummyColumn {
Metadata,
}
impl StorageColumn for DummyColumn {
fn name(&self) -> &'static str {
self.into()
}
fn id(&self) -> u32 {
*self as u32
}
}
#[derive(Clone, Debug)]
pub struct Relayer;
impl DatabaseDescription for Relayer {
#[cfg(feature = "relayer")]
type Column = fuel_core_relayer::storage::Column;
#[cfg(not(feature = "relayer"))]
type Column = DummyColumn;
type Height = DaBlockHeight;
fn version() -> u32 {
0
}
fn name() -> &'static str {
"relayer"
}
fn metadata_column() -> Self::Column {
Self::Column::Metadata
}
fn prefix(_: &Self::Column) -> Option<usize> {
None
}
}