Dash Core  0.12.2.1
P2P Digital Currency
CBlockTreeDB Class Reference

#include <txdb.h>

+ Inheritance diagram for CBlockTreeDB:

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 &fileinfo)
 
bool ReadLastBlockFile (int &nFile)
 
bool WriteReindexing (bool fReindex)
 
bool ReadReindexing (bool &fReindex)
 
bool ReadTxIndex (const uint256 &txid, CDiskTxPos &pos)
 
bool WriteTxIndex (const std::vector< std::pair< uint256, CDiskTxPos > > &list)
 
bool ReadSpentIndex (CSpentIndexKey &key, CSpentIndexValue &value)
 
bool UpdateSpentIndex (const std::vector< std::pair< CSpentIndexKey, CSpentIndexValue > > &vect)
 
bool UpdateAddressUnspentIndex (const std::vector< std::pair< CAddressUnspentKey, CAddressUnspentValue > > &vect)
 
bool ReadAddressUnspentIndex (uint160 addressHash, int type, std::vector< std::pair< CAddressUnspentKey, CAddressUnspentValue > > &vect)
 
bool WriteAddressIndex (const std::vector< std::pair< CAddressIndexKey, CAmount > > &vect)
 
bool EraseAddressIndex (const std::vector< std::pair< CAddressIndexKey, CAmount > > &vect)
 
bool ReadAddressIndex (uint160 addressHash, int type, std::vector< std::pair< CAddressIndexKey, CAmount > > &addressIndex, int start=0, int end=0)
 
bool WriteTimestampIndex (const CTimestampIndexKey &timestampIndex)
 
bool ReadTimestampIndex (const unsigned int &high, const unsigned int &low, std::vector< uint256 > &vect)
 
bool WriteFlag (const std::string &name, bool fValue)
 
bool ReadFlag (const std::string &name, bool &fValue)
 
bool LoadBlockIndexGuts ()
 
- Public Member Functions inherited from CDBWrapper
 CDBWrapper (const boost::filesystem::path &path, size_t nCacheSize, bool fMemory=false, bool fWipe=false, bool obfuscate=false)
 
 ~CDBWrapper ()
 
template<typename K , typename V >
bool Read (const K &key, V &value) const throw (dbwrapper_error)
 
template<typename K , typename V >
bool Write (const K &key, const V &value, bool fSync=false) throw (dbwrapper_error)
 
template<typename K >
bool Exists (const K &key) const throw (dbwrapper_error)
 
template<typename K >
bool Erase (const K &key, bool fSync=false) throw (dbwrapper_error)
 
bool WriteBatch (CDBBatch &batch, bool fSync=false) throw (dbwrapper_error)
 
bool Flush ()
 
bool Sync () throw (dbwrapper_error)
 
CDBIteratorNewIterator ()
 
bool IsEmpty ()
 
const std::vector< unsigned char > & GetObfuscateKey () const
 
std::string GetObfuscateKeyHex () const
 

Private Member Functions

 CBlockTreeDB (const CBlockTreeDB &)
 
void operator= (const CBlockTreeDB &)
 

Detailed Description

Access to the block database (blocks/index/)

Definition at line 54 of file txdb.h.

Constructor & Destructor Documentation

◆ CBlockTreeDB() [1/2]

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

Definition at line 78 of file txdb.cpp.

◆ CBlockTreeDB() [2/2]

CBlockTreeDB::CBlockTreeDB ( const CBlockTreeDB )
private

Member Function Documentation

◆ EraseAddressIndex()

bool CBlockTreeDB::EraseAddressIndex ( const std::vector< std::pair< CAddressIndexKey, CAmount > > &  vect)

Definition at line 231 of file txdb.cpp.

Referenced by DisconnectBlock().

◆ LoadBlockIndexGuts()

bool CBlockTreeDB::LoadBlockIndexGuts ( )

Definition at line 310 of file txdb.cpp.

Referenced by LoadBlockIndexDB().

◆ operator=()

void CBlockTreeDB::operator= ( const CBlockTreeDB )
private

◆ ReadAddressIndex()

bool CBlockTreeDB::ReadAddressIndex ( uint160  addressHash,
int  type,
std::vector< std::pair< CAddressIndexKey, CAmount > > &  addressIndex,
int  start = 0,
int  end = 0 
)

Definition at line 238 of file txdb.cpp.

Referenced by GetAddressIndex().

◆ ReadAddressUnspentIndex()

bool CBlockTreeDB::ReadAddressUnspentIndex ( uint160  addressHash,
int  type,
std::vector< std::pair< CAddressUnspentKey, CAddressUnspentValue > > &  vect 
)

Definition at line 198 of file txdb.cpp.

Referenced by GetAddressUnspent().

◆ ReadBlockFileInfo()

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

Definition at line 81 of file txdb.cpp.

Referenced by LoadBlockIndexDB().

◆ ReadFlag()

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

Definition at line 302 of file txdb.cpp.

Referenced by LoadBlockIndexDB().

◆ ReadLastBlockFile()

bool CBlockTreeDB::ReadLastBlockFile ( int &  nFile)

Definition at line 97 of file txdb.cpp.

Referenced by LoadBlockIndexDB().

◆ ReadReindexing()

bool CBlockTreeDB::ReadReindexing ( bool &  fReindex)

Definition at line 92 of file txdb.cpp.

Referenced by LoadBlockIndexDB().

◆ ReadSpentIndex()

bool CBlockTreeDB::ReadSpentIndex ( CSpentIndexKey key,
CSpentIndexValue value 
)

Definition at line 170 of file txdb.cpp.

Referenced by GetSpentIndex().

◆ ReadTimestampIndex()

bool CBlockTreeDB::ReadTimestampIndex ( const unsigned int &  high,
const unsigned int &  low,
std::vector< uint256 > &  vect 
)

Definition at line 278 of file txdb.cpp.

Referenced by GetTimestampIndex().

◆ ReadTxIndex()

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

Definition at line 159 of file txdb.cpp.

Referenced by GetTransaction().

◆ UpdateAddressUnspentIndex()

bool CBlockTreeDB::UpdateAddressUnspentIndex ( const std::vector< std::pair< CAddressUnspentKey, CAddressUnspentValue > > &  vect)

Definition at line 186 of file txdb.cpp.

Referenced by ConnectBlock(), and DisconnectBlock().

◆ UpdateSpentIndex()

bool CBlockTreeDB::UpdateSpentIndex ( const std::vector< std::pair< CSpentIndexKey, CSpentIndexValue > > &  vect)

Definition at line 174 of file txdb.cpp.

Referenced by ConnectBlock().

◆ WriteAddressIndex()

bool CBlockTreeDB::WriteAddressIndex ( const std::vector< std::pair< CAddressIndexKey, CAmount > > &  vect)

Definition at line 224 of file txdb.cpp.

Referenced by ConnectBlock().

◆ WriteBatchSync()

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

Definition at line 147 of file txdb.cpp.

Referenced by FlushStateToDisk().

◆ WriteFlag()

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

Definition at line 298 of file txdb.cpp.

Referenced by FlushStateToDisk(), and InitBlockIndex().

◆ WriteReindexing()

bool CBlockTreeDB::WriteReindexing ( bool  fReindex)

Definition at line 85 of file txdb.cpp.

Referenced by AppInit2(), and ThreadImport().

◆ WriteTimestampIndex()

bool CBlockTreeDB::WriteTimestampIndex ( const CTimestampIndexKey timestampIndex)

Definition at line 272 of file txdb.cpp.

Referenced by ConnectBlock().

◆ WriteTxIndex()

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

Definition at line 163 of file txdb.cpp.

Referenced by ConnectBlock().


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