diff --git a/ledger/src/blocktree/db.rs b/ledger/src/blocktree/db.rs index 987506c69..6c69ccbcb 100644 --- a/ledger/src/blocktree/db.rs +++ b/ledger/src/blocktree/db.rs @@ -71,7 +71,7 @@ pub mod columns { } #[derive(Debug)] -pub struct Rocks(rocksdb::DB); +struct Rocks(rocksdb::DB); impl Rocks { fn open(path: &Path) -> Result { @@ -212,11 +212,6 @@ pub trait Column { fn as_index(slot: Slot) -> Self::Index; } -pub trait IWriteBatch { - fn put_cf(&mut self, cf: ColumnFamily, key: &[u8], value: &[u8]) -> Result<()>; - fn delete_cf(&mut self, cf: ColumnFamily, key: &[u8]) -> Result<()>; -} - pub trait TypedColumn: Column { type Type: Serialize + DeserializeOwned; } @@ -742,18 +737,6 @@ impl WriteBatch { } } -impl IWriteBatch for RWriteBatch { - fn put_cf(&mut self, cf: ColumnFamily, key: &[u8], value: &[u8]) -> Result<()> { - RWriteBatch::put_cf(self, cf, key, value)?; - Ok(()) - } - - fn delete_cf(&mut self, cf: ColumnFamily, key: &[u8]) -> Result<()> { - RWriteBatch::delete_cf(self, cf, key)?; - Ok(()) - } -} - impl std::convert::From for BlocktreeError { fn from(e: rocksdb::Error) -> BlocktreeError { BlocktreeError::RocksDb(e)