Fabcoin Core
0.16.2
P2P Digital Currency
|
Access to the block database (blocks/index/) More...
#include <txdb.h>
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 | 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) |
bool | WriteHeightIndex (const CHeightTxIndexKey &heightIndex, const std::vector< uint256 > &hash) |
int | ReadHeightIndex (int low, int high, int minconf, std::vector< std::vector< uint256 >> &blocksOfHashes, std::set< dev::h160 > const &addresses) |
Iterates through blocks by height, starting from low. More... | |
bool | EraseHeightIndex (const unsigned int &height) |
bool | WipeHeightIndex () |
Public Member Functions inherited from CDBWrapper | |
CDBWrapper (const fs::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 |
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 () |
CDBIterator * | NewIterator () |
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... | |
Private Member Functions | |
CBlockTreeDB (const CBlockTreeDB &) | |
void | operator= (const CBlockTreeDB &) |
CBlockTreeDB::CBlockTreeDB | ( | size_t | nCacheSize, |
bool | fMemory = false , |
||
bool | fWipe = false |
||
) |
|
private |
bool CBlockTreeDB::EraseHeightIndex | ( | const unsigned int & | height | ) |
bool CBlockTreeDB::LoadBlockIndexGuts | ( | const Consensus::Params & | consensusParams, |
std::function< CBlockIndex *(const uint256 &)> | insertBlockIndex | ||
) |
|
private |
bool CBlockTreeDB::ReadBlockFileInfo | ( | int | nFile, |
CBlockFileInfo & | fileinfo | ||
) |
bool CBlockTreeDB::ReadFlag | ( | const std::string & | name, |
bool & | fValue | ||
) |
int CBlockTreeDB::ReadHeightIndex | ( | int | low, |
int | high, | ||
int | minconf, | ||
std::vector< std::vector< uint256 >> & | blocksOfHashes, | ||
std::set< dev::h160 > const & | addresses | ||
) |
Iterates through blocks by height, starting from low.
low | start iterating from this block height |
high | end iterating at this block height (ignored if <= 0) |
minconf | stop iterating of the block height does not have enough confirmations (ignored if <= 0) |
blocksOfHashes | transaction hashes in blocks iterated are collected into this vector. |
addresses | filter out a block unless it matches one of the addresses in this set. |
Definition at line 273 of file txdb.cpp.
bool CBlockTreeDB::ReadLastBlockFile | ( | int & | nFile | ) |
bool CBlockTreeDB::ReadReindexing | ( | bool & | fReindex | ) |
bool CBlockTreeDB::ReadTxIndex | ( | const uint256 & | txid, |
CDiskTxPos & | pos | ||
) |
bool CBlockTreeDB::WipeHeightIndex | ( | ) |
bool CBlockTreeDB::WriteBatchSync | ( | const std::vector< std::pair< int, const CBlockFileInfo * > > & | fileInfo, |
int | nLastFile, | ||
const std::vector< const CBlockIndex * > & | blockinfo | ||
) |
bool CBlockTreeDB::WriteFlag | ( | const std::string & | name, |
bool | fValue | ||
) |
bool CBlockTreeDB::WriteHeightIndex | ( | const CHeightTxIndexKey & | heightIndex, |
const std::vector< uint256 > & | hash | ||
) |
bool CBlockTreeDB::WriteReindexing | ( | bool | fReindex | ) |
bool CBlockTreeDB::WriteTxIndex | ( | const std::vector< std::pair< uint256, CDiskTxPos > > & | list | ) |