diff options
Diffstat (limited to 'src/leveldbwrapper.cpp')
-rw-r--r-- | src/leveldbwrapper.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/leveldbwrapper.cpp b/src/leveldbwrapper.cpp index ce96b5c8aa..a94cfd8a30 100644 --- a/src/leveldbwrapper.cpp +++ b/src/leveldbwrapper.cpp @@ -131,7 +131,7 @@ std::vector<unsigned char> CLevelDBWrapper::CreateObfuscateKey() const bool CLevelDBWrapper::IsEmpty() { - boost::scoped_ptr<leveldb::Iterator> it(NewIterator()); + boost::scoped_ptr<CLevelDBIterator> it(NewIterator()); it->SeekToFirst(); return !(it->Valid()); } @@ -145,3 +145,10 @@ std::string CLevelDBWrapper::GetObfuscateKeyHex() const { return HexStr(obfuscate_key); } + +CLevelDBIterator::~CLevelDBIterator() { delete piter; } +bool CLevelDBIterator::Valid() { return piter->Valid(); } +void CLevelDBIterator::SeekToFirst() { piter->SeekToFirst(); } +void CLevelDBIterator::SeekToLast() { piter->SeekToLast(); } +void CLevelDBIterator::Next() { piter->Next(); } +void CLevelDBIterator::Prev() { piter->Prev(); } |