LevelDB is now mandatory

This commit is contained in:
JoelKatz
2013-06-05 09:37:26 -07:00
parent 3d65ae7784
commit cc0b9ad01c
6 changed files with 1 additions and 48 deletions

View File

@@ -1,9 +1,7 @@
#include "HashedObject.h"
#ifdef USE_LEVELDB
#include "leveldb/db.h"
#include "leveldb/write_batch.h"
#endif
#include <boost/lexical_cast.hpp>
#include <boost/foreach.hpp>
@@ -31,14 +29,6 @@ HashedObjectStore::HashedObjectStore(int cacheSize, int cacheAge) :
WriteLog (lsFATAL, HashedObject) << "Incorrect database selection";
assert(false);
}
#ifndef USE_LEVELDB
if (mLevelDB)
{
WriteLog (lsFATAL) << "LevelDB has been selected but not compiled";
assert(false);
}
#endif
}
void HashedObjectStore::tune(int size, int age)
@@ -61,8 +51,6 @@ int HashedObjectStore::getWriteLoad()
return std::max(mWriteLoad, static_cast<int>(mWriteSet.size()));
}
#ifdef USE_LEVELDB
bool HashedObjectStore::storeLevelDB(HashedObjectType type, uint32 index,
const std::vector<unsigned char>& data, const uint256& hash)
{ // return: false = already in cache, true = added to cache
@@ -177,8 +165,6 @@ HashedObject::pointer HashedObjectStore::retrieveLevelDB(const uint256& hash)
return obj;
}
#endif
bool HashedObjectStore::storeSQLite(HashedObjectType type, uint32 index,
const std::vector<unsigned char>& data, const uint256& hash)
{ // return: false = already in cache, true = added to cache
@@ -405,8 +391,6 @@ HashedObject::pointer HashedObjectStore::retrieveSQLite(const uint256& hash)
return obj;
}
#ifdef USE_LEVELDB
int HashedObjectStore::import(const std::string& file)
{
WriteLog (lsWARNING, HashedObject) << "Hashed object import from \"" << file << "\".";
@@ -476,6 +460,4 @@ int HashedObjectStore::import(const std::string& file)
return count;
}
#endif
// vim:ts=4