diff --git a/lighthouse/db/disk_db.rs b/lighthouse/db/disk_db.rs index e4ebdedec4..f8f8a7a4cd 100644 --- a/lighthouse/db/disk_db.rs +++ b/lighthouse/db/disk_db.rs @@ -55,15 +55,7 @@ impl DiskDB { db, } } -} -impl From for DBError { - fn from(e: RocksError) -> Self { - Self { message: e.to_string() } - } -} - -impl ClientDB for DiskDB { /// Create a RocksDB column family. Corresponds to the /// `create_cf()` function on the RocksDB API. fn create_col(&mut self, col: &str) @@ -75,6 +67,15 @@ impl ClientDB for DiskDB { } } +} + +impl From for DBError { + fn from(e: RocksError) -> Self { + Self { message: e.to_string() } + } +} + +impl ClientDB for DiskDB { /// Get the value for some key on some column. /// /// Corresponds to the `get_cf()` method on the RocksDB API. diff --git a/lighthouse/db/memory_db.rs b/lighthouse/db/memory_db.rs index b7ca658bba..c875b55545 100644 --- a/lighthouse/db/memory_db.rs +++ b/lighthouse/db/memory_db.rs @@ -45,12 +45,6 @@ impl MemoryDB { } impl ClientDB for MemoryDB { - fn create_col(&mut self, col: &str) - -> Result<(), DBError> - { - Ok(()) // This field is not used. Will remove from trait. - } - /// Get the value of some key from the database. Returns `None` if the key does not exist. fn get(&self, col: &str, key: &[u8]) -> Result, DBError> diff --git a/lighthouse/db/traits.rs b/lighthouse/db/traits.rs index 97759d3b77..79766329a1 100644 --- a/lighthouse/db/traits.rs +++ b/lighthouse/db/traits.rs @@ -18,9 +18,6 @@ impl DBError { /// program to use a persistent on-disk database during production, /// but use a transient database during tests. pub trait ClientDB: Sync + Send { - fn create_col(&mut self, col: &str) - -> Result<(), DBError>; - fn get(&self, col: &str, key: &[u8]) -> Result, DBError>;