use fuel_core_chain_config::{ AddTable, AsTable, StateConfig, StateConfigBuilder, TableEntry, }; use fuel_core_storage::{ blueprint::plain::Plain, codec::{ postcard::Postcard, primitive::Primitive, raw::Raw, }, structured_storage::TableWithBlueprint, Mappable, }; use fuel_core_txpool::types::TxId; use fuel_core_types::{ blockchain::{ block::CompressedBlock, consensus::Consensus, }, fuel_tx::Transaction, fuel_types::BlockHeight, }; /// Old blocks from before regenesis. /// Has same form as [`FuelBlocks`](fuel_core_storage::tables::FuelBlocks). pub struct OldFuelBlocks; impl Mappable for OldFuelBlocks { type Key = Self::OwnedKey; type OwnedKey = BlockHeight; type Value = Self::OwnedValue; type OwnedValue = CompressedBlock; } impl TableWithBlueprint for OldFuelBlocks { type Blueprint = Plain, Postcard>; type Column = super::Column; fn column() -> Self::Column { Self::Column::OldFuelBlocks } } #[cfg(test)] fuel_core_storage::basic_storage_tests!( OldFuelBlocks, ::Key::default(), ::Value::default() ); /// Old blocks from before regenesis. /// Has same form as [`SealedBlockConsensus`](fuel_core_storage::tables::SealedBlockConsensus). pub struct OldFuelBlockConsensus; impl Mappable for OldFuelBlockConsensus { type Key = Self::OwnedKey; type OwnedKey = BlockHeight; type Value = Self::OwnedValue; type OwnedValue = Consensus; } impl TableWithBlueprint for OldFuelBlockConsensus { type Blueprint = Plain, Postcard>; type Column = super::Column; fn column() -> Self::Column { Self::Column::OldFuelBlockConsensus } } #[cfg(test)] fuel_core_storage::basic_storage_tests!( OldFuelBlockConsensus, ::Key::default(), ::Value::default() ); /// Old transactions from before regenesis. /// Has same form as [`Transactions`](fuel_core_storage::tables::Transactions). pub struct OldTransactions; impl Mappable for OldTransactions { type Key = Self::OwnedKey; type OwnedKey = TxId; type Value = Self::OwnedValue; type OwnedValue = Transaction; } impl TableWithBlueprint for OldTransactions { type Blueprint = Plain; type Column = super::Column; fn column() -> Self::Column { Self::Column::OldTransactions } } #[cfg(test)] fuel_core_storage::basic_storage_tests!( OldTransactions, ::Key::default(), ::Value::default() ); impl AsTable for StateConfig { fn as_table(&self) -> Vec> { Vec::new() // Do not include these for now } } impl AddTable for StateConfigBuilder { fn add(&mut self, _entries: Vec>) { // Do not include these for now } } impl AsTable for StateConfig { fn as_table(&self) -> Vec> { Vec::new() // Do not include these for now } } impl AddTable for StateConfigBuilder { fn add(&mut self, _entries: Vec>) { // Do not include these for now } } impl AsTable for StateConfig { fn as_table(&self) -> Vec> { Vec::new() // Do not include these for now } } impl AddTable for StateConfigBuilder { fn add(&mut self, _entries: Vec>) { // Do not include these for now } }