PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Public Member Functions | Private 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)
 
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 &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 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 ()
 
bool ReadKeyImage (const std::string &keyImage, uint256 &bh)
 
bool ReadKeyImages (const std::string &keyImage, std::vector< uint256 > &bhs)
 
bool WriteKeyImage (const std::string &keyImage, const uint256 &height)
 
- Public Member Functions inherited from CDBWrapper
 CDBWrapper (const fs::path &path, size_t nCacheSize, bool fMemory=false, bool fWipe=false)
 
 ~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...
 

Private Member Functions

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

Detailed Description

Access to the block database (blocks/index/)

Definition at line 74 of file txdb.h.

Constructor & Destructor Documentation

◆ CBlockTreeDB() [1/2]

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

Definition at line 77 of file txdb.cpp.

◆ CBlockTreeDB() [2/2]

CBlockTreeDB::CBlockTreeDB ( const CBlockTreeDB )
private

Member Function Documentation

◆ LoadBlockIndexGuts()

bool CBlockTreeDB::LoadBlockIndexGuts ( )

Definition at line 238 of file txdb.cpp.

Here is the call graph for this function:

◆ operator=()

void CBlockTreeDB::operator= ( const CBlockTreeDB )
private

◆ ReadBlockFileInfo()

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

Definition at line 87 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 219 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 233 of file txdb.cpp.

Here is the call graph for this function:

◆ ReadKeyImage()

bool CBlockTreeDB::ReadKeyImage ( const std::string &  keyImage,
uint256 bh 
)

Definition at line 183 of file txdb.cpp.

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

◆ ReadKeyImages()

bool CBlockTreeDB::ReadKeyImages ( const std::string &  keyImage,
std::vector< uint256 > &  bhs 
)

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

Here is the call graph for this function:

◆ ReadReindexing()

bool CBlockTreeDB::ReadReindexing ( bool &  fReindex)

Definition at line 100 of file txdb.cpp.

Here is the call graph for this function:

◆ ReadTxIndex()

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

Definition at line 168 of file txdb.cpp.

Here is the call graph for this function:
Here is the caller 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 156 of file txdb.cpp.

Here is the call graph for this function:

◆ WriteBlockIndex()

bool CBlockTreeDB::WriteBlockIndex ( const CDiskBlockIndex blockindex)

Definition at line 81 of file txdb.cpp.

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

◆ WriteFlag()

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

Definition at line 214 of file txdb.cpp.

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

◆ WriteInt()

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

Definition at line 228 of file txdb.cpp.

Here is the call graph for this function:

◆ WriteKeyImage()

bool CBlockTreeDB::WriteKeyImage ( const std::string &  keyImage,
const uint256 height 
)

Definition at line 201 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  fReindex)

Definition at line 92 of file txdb.cpp.

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

◆ WriteTxIndex()

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

Definition at line 173 of file txdb.cpp.

Here is the call graph for this function:

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