diff --git a/ledger/src/blocktree/db.rs b/ledger/src/blocktree/db.rs index 34d5b961a..987506c69 100644 --- a/ledger/src/blocktree/db.rs +++ b/ledger/src/blocktree/db.rs @@ -212,20 +212,6 @@ pub trait Column { fn as_index(slot: Slot) -> Self::Index; } -pub trait DbCursor { - fn valid(&self) -> bool; - - fn seek(&mut self, key: &[u8]); - - fn seek_to_first(&mut self); - - fn next(&mut self); - - fn key(&self) -> Option>; - - fn value(&self) -> Option>; -} - 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<()>; @@ -756,32 +742,6 @@ impl WriteBatch { } } -impl DbCursor for DBRawIterator { - fn valid(&self) -> bool { - DBRawIterator::valid(self) - } - - fn seek(&mut self, key: &[u8]) { - DBRawIterator::seek(self, key); - } - - fn seek_to_first(&mut self) { - DBRawIterator::seek_to_first(self); - } - - fn next(&mut self) { - DBRawIterator::next(self); - } - - fn key(&self) -> Option> { - DBRawIterator::key(self) - } - - fn value(&self) -> Option> { - DBRawIterator::value(self) - } -} - impl IWriteBatch for RWriteBatch { fn put_cf(&mut self, cf: ColumnFamily, key: &[u8], value: &[u8]) -> Result<()> { RWriteBatch::put_cf(self, cf, key, value)?;