Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <evodb.h>
Public Member Functions | |
CEvoDB (size_t nCacheSize, bool fMemory=false, bool fWipe=false) | |
std::unique_ptr< CEvoDBScopedCommitter > | BeginTransaction () |
CurTransaction & | GetCurTransaction () |
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) |
CDBWrapper & | GetRawDB () |
size_t | GetMemoryUsage () |
bool | CommitRootTransaction () |
bool | VerifyBestBlock (const uint256 &hash) |
void | WriteBestBlock (const uint256 &hash) |
Public Attributes | |
CCriticalSection | cs |
Private Types | |
typedef CDBTransaction< CDBWrapper, CDBBatch > | RootTransaction |
typedef CDBTransaction< RootTransaction, RootTransaction > | CurTransaction |
Private Member Functions | |
void | CommitCurTransaction () |
void | RollbackCurTransaction () |
Private Attributes | |
CDBWrapper | db |
CDBBatch | rootBatch |
RootTransaction | rootDBTransaction |
CurTransaction | curDBTransaction |
Friends | |
class | CEvoDBScopedCommitter |
Detailed Description
Member Typedef Documentation
◆ CurTransaction
|
private |
◆ RootTransaction
|
private |
Constructor & Destructor Documentation
◆ CEvoDB()
Member Function Documentation
◆ BeginTransaction()
|
inline |
Definition at line 49 of file evodb.h.
Referenced by CDeterministicMNManager::UpgradeDBIfNeeded().
◆ CommitCurTransaction()
|
private |
Definition at line 42 of file evodb.cpp.
References CDBTransaction< Parent, CommitTarget >::Commit(), cs, curDBTransaction, and LOCK.
Referenced by CEvoDBScopedCommitter::Commit().
◆ CommitRootTransaction()
bool CEvoDB::CommitRootTransaction | ( | ) |
Definition at line 54 of file evodb.cpp.
References CDBBatch::Clear(), CDBTransaction< Parent, CommitTarget >::Commit(), curDBTransaction, db, CDBTransaction< Parent, CommitTarget >::IsClean(), rootBatch, rootDBTransaction, and CDBWrapper::WriteBatch().
◆ Erase()
|
inline |
Definition at line 83 of file evodb.h.
References cs, curDBTransaction, CDBTransaction< Parent, CommitTarget >::Erase(), and LOCK.
Referenced by llmq::CQuorumBlockProcessor::UndoBlock().
◆ Exists()
|
inline |
Definition at line 76 of file evodb.h.
References cs, curDBTransaction, CDBTransaction< Parent, CommitTarget >::Exists(), and LOCK.
Referenced by llmq::CQuorumBlockProcessor::HasMinedCommitment().
◆ GetCurTransaction()
|
inline |
Definition at line 55 of file evodb.h.
References AssertLockHeld(), cs, and curDBTransaction.
Referenced by llmq::CQuorumBlockProcessor::GetMinedCommitmentsUntilBlock().
◆ GetMemoryUsage()
|
inline |
Definition at line 94 of file evodb.h.
References CDBTransaction< Parent, CommitTarget >::GetMemoryUsage(), and rootDBTransaction.
◆ GetRawDB()
|
inline |
Definition at line 89 of file evodb.h.
References db.
Referenced by llmq::CQuorumBlockProcessor::UpgradeDB(), CDeterministicMNManager::UpgradeDBIfNeeded(), and CDeterministicMNManager::UpgradeDiff().
◆ Read()
|
inline |
Definition at line 62 of file evodb.h.
References cs, curDBTransaction, LOCK, and CDBTransaction< Parent, CommitTarget >::Read().
Referenced by CDeterministicMNManager::GetListForBlock(), llmq::CQuorumBlockProcessor::GetMinedCommitment(), CDeterministicMNManager::UndoBlock(), and VerifyBestBlock().
◆ RollbackCurTransaction()
|
private |
Definition at line 48 of file evodb.cpp.
References CDBTransaction< Parent, CommitTarget >::Clear(), cs, curDBTransaction, and LOCK.
Referenced by CEvoDBScopedCommitter::Rollback().
◆ VerifyBestBlock()
bool CEvoDB::VerifyBestBlock | ( | const uint256 & | hash | ) |
Definition at line 63 of file evodb.cpp.
References EVODB_BEST_BLOCK, and Read().
◆ Write()
|
inline |
Definition at line 69 of file evodb.h.
References cs, curDBTransaction, LOCK, and CDBTransaction< Parent, CommitTarget >::Write().
Referenced by llmq::CQuorumBlockProcessor::ProcessBlock(), CDeterministicMNManager::ProcessBlock(), llmq::CQuorumBlockProcessor::ProcessCommitment(), llmq::CQuorumBlockProcessor::UndoBlock(), and WriteBestBlock().
◆ 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 |
Member Data Documentation
◆ cs
CCriticalSection CEvoDB::cs |
Definition at line 35 of file evodb.h.
Referenced by BeginTransaction(), CommitCurTransaction(), Erase(), Exists(), GetCurTransaction(), llmq::CQuorumBlockProcessor::GetMinedCommitmentsUntilBlock(), Read(), RollbackCurTransaction(), and Write().
◆ curDBTransaction
|
private |
Definition at line 44 of file evodb.h.
Referenced by CommitCurTransaction(), CommitRootTransaction(), Erase(), Exists(), GetCurTransaction(), Read(), RollbackCurTransaction(), and Write().
◆ db
|
private |
Definition at line 37 of file evodb.h.
Referenced by CommitRootTransaction(), and GetRawDB().
◆ rootBatch
|
private |
Definition at line 42 of file evodb.h.
Referenced by CommitRootTransaction().
◆ 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: