Bitcoin ABC 0.26.3
P2P Digital Currency
|
Access to the txindex database (indexes/txindex/) More...
Public Member Functions | |
DB (size_t n_cache_size, bool f_memory=false, bool f_wipe=false) | |
bool | ReadTxPos (const TxId &txid, CDiskTxPos &pos) const |
Read the disk location of the transaction data with the given ID. | |
bool | WriteTxs (const std::vector< std::pair< TxId, CDiskTxPos > > &v_pos) |
Write a batch of transaction positions to the DB. | |
Public Member Functions inherited from BaseIndex::DB | |
DB (const fs::path &path, size_t n_cache_size, bool f_memory=false, bool f_wipe=false, bool f_obfuscate=false) | |
bool | ReadBestBlock (CBlockLocator &locator) const |
Read block locator of the chain that the index is in sync with. | |
void | WriteBestBlock (CDBBatch &batch, const CBlockLocator &locator) |
Write block locator of the chain that the index is in sync with. | |
Public Member Functions inherited from CDBWrapper | |
CDBWrapper (const DBParams ¶ms) | |
~CDBWrapper () | |
CDBWrapper (const CDBWrapper &)=delete | |
CDBWrapper & | operator= (const CDBWrapper &)=delete |
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) |
std::optional< fs::path > | StoragePath () |
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) |
size_t | DynamicMemoryUsage () const |
CDBIterator * | NewIterator () |
bool | IsEmpty () |
Return true if the database managed by this class contains no entries. | |
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. | |
Access to the txindex database (indexes/txindex/)
Definition at line 19 of file txindex.cpp.
Definition at line 32 of file txindex.cpp.
bool TxIndex::DB::ReadTxPos | ( | const TxId & | txid, |
CDiskTxPos & | pos | ||
) | const |
Read the disk location of the transaction data with the given ID.
Returns false if the transaction ID is not indexed.
Definition at line 36 of file txindex.cpp.
bool TxIndex::DB::WriteTxs | ( | const std::vector< std::pair< TxId, CDiskTxPos > > & | v_pos | ) |
Write a batch of transaction positions to the DB.
Definition at line 40 of file txindex.cpp.