bunch of changes
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "dbwrapper.h"
|
||||
#include <dbwrapper.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "random.h"
|
||||
#include <util.h>
|
||||
#include <random.h>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
@@ -22,7 +22,7 @@ static leveldb::Options GetOptions(size_t nCacheSize)
|
||||
options.write_buffer_size = nCacheSize / 4; // up to two write buffers may be held in memory simultaneously
|
||||
options.filter_policy = leveldb::NewBloomFilterPolicy(10);
|
||||
options.compression = leveldb::kNoCompression;
|
||||
options.max_open_files = 64;
|
||||
options.max_open_files = 1000;
|
||||
if (leveldb::kMajorVersion > 1 || (leveldb::kMajorVersion == 1 && leveldb::kMinorVersion >= 16)) {
|
||||
// LevelDB versions before 1.16 consider short writes to be corruption. Only trigger error
|
||||
// on corruption in later versions.
|
||||
@@ -33,7 +33,7 @@ static leveldb::Options GetOptions(size_t nCacheSize)
|
||||
|
||||
CDBWrapper::CDBWrapper(const boost::filesystem::path& path, size_t nCacheSize, bool fMemory, bool fWipe, bool obfuscate)
|
||||
{
|
||||
penv = NULL;
|
||||
penv = nullptr;
|
||||
readoptions.verify_checksums = true;
|
||||
iteroptions.verify_checksums = true;
|
||||
iteroptions.fill_cache = false;
|
||||
@@ -79,13 +79,13 @@ CDBWrapper::CDBWrapper(const boost::filesystem::path& path, size_t nCacheSize, b
|
||||
CDBWrapper::~CDBWrapper()
|
||||
{
|
||||
delete pdb;
|
||||
pdb = NULL;
|
||||
pdb = nullptr;
|
||||
delete options.filter_policy;
|
||||
options.filter_policy = NULL;
|
||||
options.filter_policy = nullptr;
|
||||
delete options.block_cache;
|
||||
options.block_cache = NULL;
|
||||
options.block_cache = nullptr;
|
||||
delete penv;
|
||||
options.env = NULL;
|
||||
options.env = nullptr;
|
||||
}
|
||||
|
||||
bool CDBWrapper::WriteBatch(CDBBatch& batch, bool fSync)
|
||||
|
||||
Reference in New Issue
Block a user