Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

#include <evodb.h>

+ Collaboration diagram for CEvoDB:

Public Member Functions

 CEvoDB (size_t nCacheSize, bool fMemory=false, bool fWipe=false)
 
std::unique_ptr< CEvoDBScopedCommitterBeginTransaction ()
 
CurTransactionGetCurTransaction ()
 
template<typename K , typename V >
bool Read (const K &key, V &value)
 
template<typename K , typename V >
void Write (const K &key, const V &value)
 
template<typename K >
bool Exists (const K &key)
 
template<typename K >
void Erase (const K &key)
 
CDBWrapperGetRawDB ()
 
size_t GetMemoryUsage ()
 
bool CommitRootTransaction ()
 
bool VerifyBestBlock (const uint256 &hash)
 
void WriteBestBlock (const uint256 &hash)
 

Public Attributes

CCriticalSection cs
 

Private Types

typedef CDBTransaction< CDBWrapper, CDBBatchRootTransaction
 
typedef CDBTransaction< RootTransaction, RootTransactionCurTransaction
 

Private Member Functions

void CommitCurTransaction ()
 
void RollbackCurTransaction ()
 

Private Attributes

CDBWrapper db
 
CDBBatch rootBatch
 
RootTransaction rootDBTransaction
 
CurTransaction curDBTransaction
 

Friends

class CEvoDBScopedCommitter
 

Detailed Description

Definition at line 32 of file evodb.h.

Member Typedef Documentation

◆ CurTransaction

Definition at line 40 of file evodb.h.

◆ RootTransaction

Definition at line 39 of file evodb.h.

Constructor & Destructor Documentation

◆ CEvoDB()

CEvoDB::CEvoDB ( size_t  nCacheSize,
bool  fMemory = false,
bool  fWipe = false 
)
explicit

Definition at line 34 of file evodb.cpp.

Member Function Documentation

◆ BeginTransaction()

std::unique_ptr<CEvoDBScopedCommitter> CEvoDB::BeginTransaction ( )
inline

Definition at line 49 of file evodb.h.

References cs, and LOCK.

Referenced by CDeterministicMNManager::UpgradeDBIfNeeded().

◆ CommitCurTransaction()

void CEvoDB::CommitCurTransaction ( )
private

◆ CommitRootTransaction()

◆ Erase()

template<typename K >
void CEvoDB::Erase ( const K &  key)
inline

◆ Exists()

template<typename K >
bool CEvoDB::Exists ( const K &  key)
inline

◆ GetCurTransaction()

CurTransaction& CEvoDB::GetCurTransaction ( )
inline

◆ GetMemoryUsage()

size_t CEvoDB::GetMemoryUsage ( )
inline

◆ GetRawDB()

CDBWrapper& CEvoDB::GetRawDB ( )
inline

◆ Read()

template<typename K , typename V >
bool CEvoDB::Read ( const K &  key,
V &  value 
)
inline

◆ RollbackCurTransaction()

void CEvoDB::RollbackCurTransaction ( )
private

◆ VerifyBestBlock()

bool CEvoDB::VerifyBestBlock ( const uint256 hash)

Definition at line 63 of file evodb.cpp.

References EVODB_BEST_BLOCK, and Read().

◆ Write()

template<typename K , typename V >
void CEvoDB::Write ( const K &  key,
const V &  value 
)
inline

◆ WriteBestBlock()

void CEvoDB::WriteBestBlock ( const uint256 hash)

Definition at line 75 of file evodb.cpp.

References EVODB_BEST_BLOCK, and Write().

Referenced by CDeterministicMNManager::UpgradeDBIfNeeded().

Friends And Related Function Documentation

◆ CEvoDBScopedCommitter

friend class CEvoDBScopedCommitter
friend

Definition at line 106 of file evodb.h.

Member Data Documentation

◆ cs

◆ curDBTransaction

CurTransaction CEvoDB::curDBTransaction
private

◆ db

CDBWrapper CEvoDB::db
private

Definition at line 37 of file evodb.h.

Referenced by CommitRootTransaction(), and GetRawDB().

◆ rootBatch

CDBBatch CEvoDB::rootBatch
private

Definition at line 42 of file evodb.h.

Referenced by CommitRootTransaction().

◆ rootDBTransaction

RootTransaction CEvoDB::rootDBTransaction
private

Definition at line 43 of file evodb.h.

Referenced by CommitRootTransaction(), and GetMemoryUsage().


The documentation for this class was generated from the following files:
Released under the MIT license