Bitcoin ABC  0.28.12
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
CBlockTreeDB Class Reference

Access to the block database (blocks/index/) More...

#include <txdb.h>

Inheritance diagram for CBlockTreeDB:
[legend]
Collaboration diagram for CBlockTreeDB:
[legend]

Public Member Functions

 CBlockTreeDB (size_t nCacheSize, bool fMemory=false, bool fWipe=false)
 
bool WriteBatchSync (const std::vector< std::pair< int, const CBlockFileInfo * >> &fileInfo, int nLastFile, const std::vector< const CBlockIndex * > &blockinfo)
 
bool ReadBlockFileInfo (int nFile, CBlockFileInfo &info)
 
bool ReadLastBlockFile (int &nFile)
 
bool WriteReindexing (bool fReindexing)
 
bool IsReindexing () const
 
bool WriteFlag (const std::string &name, bool fValue)
 
bool ReadFlag (const std::string &name, bool &fValue)
 
bool Upgrade ()
 Attempt to update from an older database format. More...
 
- Public Member Functions inherited from CDBWrapper
 CDBWrapper (const fs::path &path, size_t nCacheSize, bool fMemory=false, bool fWipe=false, bool obfuscate=false)
 
 ~CDBWrapper ()
 
 CDBWrapper (const CDBWrapper &)=delete
 
CDBWrapperoperator= (const CDBWrapper &)=delete
 
template<typename K , typename V >
bool Read (const K &key, V &value) const
 
template<typename K , typename V >
bool Write (const K &key, const V &value, bool fSync=false)
 
std::optional< fs::pathStoragePath ()
 
template<typename K >
bool Exists (const K &key) const
 
template<typename K >
bool Erase (const K &key, bool fSync=false)
 
bool WriteBatch (CDBBatch &batch, bool fSync=false)
 
size_t DynamicMemoryUsage () const
 
CDBIteratorNewIterator ()
 
bool IsEmpty ()
 Return true if the database managed by this class contains no entries. More...
 
template<typename K >
size_t EstimateSize (const K &key_begin, const K &key_end) const
 
template<typename K >
void CompactRange (const K &key_begin, const K &key_end) const
 Compact a certain range of keys in the database. More...
 

Public Attributes

bool LoadBlockIndexGuts (const Consensus::Params &params, std::function< CBlockIndex *(const BlockHash &)> insertBlockIndex) EXCLUSIVE_LOCKS_REQUIRED(
 

Detailed Description

Access to the block database (blocks/index/)

Definition at line 112 of file txdb.h.

Constructor & Destructor Documentation

◆ CBlockTreeDB()

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

Definition at line 192 of file txdb.cpp.

Member Function Documentation

◆ IsReindexing()

bool CBlockTreeDB::IsReindexing ( ) const

Definition at line 208 of file txdb.cpp.

Here is the call graph for this function:

◆ ReadBlockFileInfo()

bool CBlockTreeDB::ReadBlockFileInfo ( int  nFile,
CBlockFileInfo info 
)

Definition at line 196 of file txdb.cpp.

Here is the call graph for this function:

◆ ReadFlag()

bool CBlockTreeDB::ReadFlag ( const std::string &  name,
bool &  fValue 
)

Definition at line 293 of file txdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadLastBlockFile()

bool CBlockTreeDB::ReadLastBlockFile ( int &  nFile)

Definition at line 212 of file txdb.cpp.

Here is the call graph for this function:

◆ Upgrade()

bool CBlockTreeDB::Upgrade ( )

Attempt to update from an older database format.

Returns whether an error occurred.

Definition at line 493 of file txdb.cpp.

Here is the call graph for this function:

◆ WriteBatchSync()

bool CBlockTreeDB::WriteBatchSync ( const std::vector< std::pair< int, const CBlockFileInfo * >> &  fileInfo,
int  nLastFile,
const std::vector< const CBlockIndex * > &  blockinfo 
)

Definition at line 270 of file txdb.cpp.

Here is the call graph for this function:

◆ WriteFlag()

bool CBlockTreeDB::WriteFlag ( const std::string &  name,
bool  fValue 
)

Definition at line 289 of file txdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteReindexing()

bool CBlockTreeDB::WriteReindexing ( bool  fReindexing)

Definition at line 200 of file txdb.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ LoadBlockIndexGuts

bool CBlockTreeDB::LoadBlockIndexGuts

Definition at line 126 of file txdb.h.


The documentation for this class was generated from the following files: