lighthouse-pulse/lighthouse/db/stores/mod.rs

37 lines
726 B
Rust
Raw Normal View History

2018-09-20 07:36:49 +00:00
use super::{
ClientDB,
DBError,
};
mod block_store;
2018-09-21 01:13:07 +00:00
mod pow_chain_store;
2018-09-21 08:52:03 +00:00
mod validator_store;
2018-09-20 07:36:49 +00:00
pub use self::block_store::BlockStore;
2018-09-21 01:13:07 +00:00
pub use self::pow_chain_store::PoWChainStore;
2018-09-22 01:13:55 +00:00
pub use self::validator_store::ValidatorStore;
2018-09-20 07:36:49 +00:00
2018-09-24 03:16:39 +00:00
use super::bls;
pub const BLOCKS_DB_COLUMN: &str = "blocks";
pub const POW_CHAIN_DB_COLUMN: &str = "powchain";
pub const VALIDATOR_DB_COLUMN: &str = "validator";
pub const COLUMNS: [&str; 3] = [
BLOCKS_DB_COLUMN,
POW_CHAIN_DB_COLUMN,
VALIDATOR_DB_COLUMN,
];
2018-09-24 03:16:39 +00:00
#[derive(Debug, PartialEq)]
pub enum StoreError {
DBError(String),
DecodeError,
}
impl From<DBError> for StoreError {
fn from(error: DBError) -> Self {
StoreError::DBError(error.message)
}
}