PIVX Core  5.6.99
P2P Digital Currency
Public Member Functions | 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)
 
 CBlockTreeDB (const CBlockTreeDB &)=delete
 
CBlockTreeDBoperator= (const CBlockTreeDB &)=delete
 
bool WriteBlockIndex (const CDiskBlockIndex &blockindex)
 
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 ReadReindexing (bool &fReindexing)
 
bool ReadTxIndex (const uint256 &txid, CDiskTxPos &pos)
 
bool WriteTxIndex (const std::vector< std::pair< uint256, CDiskTxPos > > &vect)
 
bool WriteFlag (const std::string &name, bool fValue)
 
bool ReadFlag (const std::string &name, bool &fValue)
 
bool WriteInt (const std::string &name, int nValue)
 
bool ReadInt (const std::string &name, int &nValue)
 
bool LoadBlockIndexGuts (std::function< CBlockIndex *(const uint256 &)> insertBlockIndex)
 
- Public Member Functions inherited from CDBWrapper
 CDBWrapper (const fs::path &path, size_t nCacheSize, bool fMemory=false, bool fWipe=false, int nVersion=CLIENT_VERSION)
 
 ~CDBWrapper ()
 
template<typename K >
bool ReadDataStream (const K &key, CDataStream &ssValue) const
 
bool ReadDataStream (const CDataStream &ssKey, CDataStream &ssValue) const
 
template<typename K , typename V >
bool Read (const K &key, V &value) const
 
template<typename V >
bool Read (const CDataStream &ssKey, V &value) const
 
template<typename K , typename V >
bool Write (const K &key, const V &value, bool fSync=false)
 
template<typename K >
bool Exists (const K &key) const
 
bool Exists (const CDataStream &key) const
 
template<typename K >
bool Erase (const K &key, bool fSync=false)
 
bool WriteBatch (CDBBatch &batch, bool fSync=false)
 
bool Flush ()
 
bool Sync ()
 
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...
 
void CompactFull () const
 

Detailed Description

Access to the block database (blocks/index/)

Definition at line 127 of file txdb.h.

Constructor & Destructor Documentation

◆ CBlockTreeDB() [1/2]

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

Definition at line 151 of file txdb.cpp.

◆ CBlockTreeDB() [2/2]

CBlockTreeDB::CBlockTreeDB ( const CBlockTreeDB )
delete

Member Function Documentation

◆ LoadBlockIndexGuts()

bool CBlockTreeDB::LoadBlockIndexGuts ( std::function< CBlockIndex *(const uint256 &)>  insertBlockIndex)

Definition at line 288 of file txdb.cpp.

Here is the call graph for this function:

◆ operator=()

CBlockTreeDB& CBlockTreeDB::operator= ( const CBlockTreeDB )
delete

◆ ReadBlockFileInfo()

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

Definition at line 160 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 269 of file txdb.cpp.

Here is the call graph for this function:

◆ ReadInt()

bool CBlockTreeDB::ReadInt ( const std::string &  name,
int &  nValue 
)

Definition at line 283 of file txdb.cpp.

Here is the call graph for this function:

◆ ReadLastBlockFile()

bool CBlockTreeDB::ReadLastBlockFile ( int &  nFile)

Definition at line 179 of file txdb.cpp.

Here is the call graph for this function:

◆ ReadReindexing()

bool CBlockTreeDB::ReadReindexing ( bool &  fReindexing)

Definition at line 173 of file txdb.cpp.

Here is the call graph for this function:

◆ ReadTxIndex()

bool CBlockTreeDB::ReadTxIndex ( const uint256 txid,
CDiskTxPos pos 
)

Definition at line 251 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 239 of file txdb.cpp.

◆ WriteBlockIndex()

bool CBlockTreeDB::WriteBlockIndex ( const CDiskBlockIndex blockindex)

Definition at line 155 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 264 of file txdb.cpp.

Here is the call graph for this function:

◆ WriteInt()

bool CBlockTreeDB::WriteInt ( const std::string &  name,
int  nValue 
)

Definition at line 278 of file txdb.cpp.

Here is the call graph for this function:

◆ WriteReindexing()

bool CBlockTreeDB::WriteReindexing ( bool  fReindexing)

Definition at line 165 of file txdb.cpp.

Here is the call graph for this function:

◆ WriteTxIndex()

bool CBlockTreeDB::WriteTxIndex ( const std::vector< std::pair< uint256, CDiskTxPos > > &  vect)

Definition at line 256 of file txdb.cpp.


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