diff --git a/lighthouse/db/mod.rs b/lighthouse/db/mod.rs index 23ddb9a37..6472e7f62 100644 --- a/lighthouse/db/mod.rs +++ b/lighthouse/db/mod.rs @@ -4,18 +4,23 @@ mod disk_db; pub use self::disk_db::DiskDB; +type DBValue = Vec; + #[derive(Debug)] pub struct DBError { message: String } impl DBError { - fn new(message: String) -> Self { + pub fn new(message: String) -> Self { Self { message } } } pub trait ClientDB: Sync + Send { fn get(&self, col: &str, key: &[u8]) - -> Result, DBError>; + -> Result, DBError>; + + fn put(&self, col: &str, key: &[u8], val: &[u8]) + -> Result<(), DBError>; }