37 CEvoDB::CEvoDB(
size_t nCacheSize,
bool fMemory,
bool fWipe) : db(fMemory ?
"" : (
GetDataDir() /
"evodb"), nCacheSize, fMemory, fWipe, CLIENT_VERSION | ADDRV2_FORMAT),
38 rootBatch(CLIENT_VERSION | ADDRV2_FORMAT),
39 rootDBTransaction(db, rootBatch, CLIENT_VERSION | ADDRV2_FORMAT),
40 curDBTransaction(rootDBTransaction, rootDBTransaction, CLIENT_VERSION | ADDRV2_FORMAT)
69 return Read(EVODB_BEST_BLOCK, hashBestBlock) && hashBestBlock == hash;
74 Write(EVODB_BEST_BLOCK, hash);
bool WriteBatch(CDBBatch &batch, bool fSync=false)
void RollbackCurTransaction()
bool VerifyBestBlock(const uint256 &hash)
void WriteBestBlock(const uint256 &hash)
CEvoDB(size_t nCacheSize, bool fMemory=false, bool fWipe=false)
bool CommitRootTransaction()
void Write(const K &key, const V &value)
bool Read(const K &key, V &value)
void CommitCurTransaction()
CurTransaction curDBTransaction
RootTransaction rootDBTransaction
CEvoDBScopedCommitter(CEvoDB &_evoDB)
std::unique_ptr< CEvoDB > evoDb
const fs::path & GetDataDir(bool fNetSpecific)