Raven Core  3.0.0
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, size_t maxFileSize=2<< 20)
 
 CBlockTreeDB (const CBlockTreeDB &)=delete
 
CBlockTreeDBoperator= (const CBlockTreeDB &)=delete
 
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 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::string assetName, 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::string assetName, std::vector< std::pair< CAddressIndexKey, CAmount > > &addressIndex, int start=0, int end=0)
 
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, const bool fActiveOnly, std::vector< std::pair< uint256, unsigned int > > &vect)
 
bool WriteTimestampBlockIndex (const CTimestampBlockIndexKey &blockhashIndex, const CTimestampBlockIndexValue &logicalts)
 
bool ReadTimestampBlockIndex (const uint256 &hash, unsigned int &logicalTS)
 
bool WriteFlag (const std::string &name, bool fValue)
 
bool ReadFlag (const std::string &name, bool &fValue)
 
bool LoadBlockIndexGuts (const Consensus::Params &consensusParams, 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, bool obfuscate=false, size_t maxFileSize=2<< 20)
 
 ~CDBWrapper ()
 
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)
 
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)
 
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...
 

Detailed Description

Access to the block database (blocks/index/)

Definition at line 113 of file txdb.h.

Constructor & Destructor Documentation

◆ CBlockTreeDB() [1/2]

CBlockTreeDB::CBlockTreeDB ( size_t  nCacheSize,
bool  fMemory = false,
bool  fWipe = false,
size_t  maxFileSize = 2 << 20 
)
explicit

Definition at line 157 of file txdb.cpp.

◆ CBlockTreeDB() [2/2]

CBlockTreeDB::CBlockTreeDB ( const CBlockTreeDB )
delete

Member Function Documentation

◆ EraseAddressIndex()

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

Definition at line 347 of file txdb.cpp.

Here is the call graph for this function:

◆ LoadBlockIndexGuts()

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

Definition at line 460 of file txdb.cpp.

Here is the call graph for this function:

◆ operator=()

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

◆ ReadAddressIndex() [1/2]

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

Definition at line 354 of file txdb.cpp.

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

◆ ReadAddressIndex() [2/2]

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

Definition at line 392 of file txdb.cpp.

Here is the call graph for this function:

◆ ReadAddressUnspentIndex() [1/2]

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

Definition at line 285 of file txdb.cpp.

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

◆ ReadAddressUnspentIndex() [2/2]

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

Definition at line 312 of file txdb.cpp.

Here is the call graph for this function:

◆ 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 452 of file txdb.cpp.

Here is the call graph for this function:

◆ ReadLastBlockFile()

bool CBlockTreeDB::ReadLastBlockFile ( int &  nFile)

Definition at line 176 of file txdb.cpp.

Here is the call graph for this function:

◆ ReadReindexing()

bool CBlockTreeDB::ReadReindexing ( bool &  fReindexing)

Definition at line 171 of file txdb.cpp.

Here is the call graph for this function:

◆ ReadSpentIndex()

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

Definition at line 257 of file txdb.cpp.

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

◆ ReadTimestampBlockIndex()

bool CBlockTreeDB::ReadTimestampBlockIndex ( const uint256 hash,
unsigned int &  logicalTS 
)

Definition at line 438 of file txdb.cpp.

Here is the call graph for this function:

◆ ReadTimestampIndex()

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

Definition at line 405 of file txdb.cpp.

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

◆ ReadTxIndex()

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

Definition at line 246 of file txdb.cpp.

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

◆ UpdateAddressUnspentIndex()

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

Definition at line 273 of file txdb.cpp.

Here is the call graph for this function:

◆ UpdateSpentIndex()

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

Definition at line 261 of file txdb.cpp.

Here is the call graph for this function:

◆ WriteAddressIndex()

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

Definition at line 340 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 234 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 448 of file txdb.cpp.

Here is the call graph for this function:

◆ WriteReindexing()

bool CBlockTreeDB::WriteReindexing ( bool  fReindexing)

Definition at line 164 of file txdb.cpp.

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

◆ WriteTimestampBlockIndex()

bool CBlockTreeDB::WriteTimestampBlockIndex ( const CTimestampBlockIndexKey blockhashIndex,
const CTimestampBlockIndexValue logicalts 
)

Definition at line 432 of file txdb.cpp.

Here is the call graph for this function:

◆ WriteTimestampIndex()

bool CBlockTreeDB::WriteTimestampIndex ( const CTimestampIndexKey timestampIndex)

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

Here is the call graph for this function:

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