use fuel_core_storage::{
Mappable,
blueprint::plain::Plain,
codec::{
primitive::Primitive,
raw::Raw,
},
structured_storage::TableWithBlueprint,
};
use fuel_core_types::{
blockchain::primitives::BlockId,
fuel_types::BlockHeight,
};
pub struct FuelBlockIdsToHeights;
impl Mappable for FuelBlockIdsToHeights {
type Key = BlockId;
type OwnedKey = Self::Key;
type Value = BlockHeight;
type OwnedValue = Self::Value;
}
impl TableWithBlueprint for FuelBlockIdsToHeights {
type Blueprint = Plain<Raw, Primitive<4>>;
type Column = super::Column;
fn column() -> Self::Column {
Self::Column::FuelBlockIdsToHeights
}
}
#[cfg(test)]
fuel_core_storage::basic_storage_tests!(
FuelBlockIdsToHeights,
<FuelBlockIdsToHeights as Mappable>::Key::default(),
<FuelBlockIdsToHeights as Mappable>::Value::default()
);