5#ifndef BITCOIN_INDEX_TXINDEX_H
6#define BITCOIN_INDEX_TXINDEX_H
32 const std::unique_ptr<DB>
m_db;
43 explicit TxIndex(std::unique_ptr<interfaces::Chain> chain,
size_t n_cache_size,
bool f_memory =
false,
bool f_wipe =
false);
The database stores a block locator of the chain the database is synced to so that the index can effi...
BaseIndex(std::unique_ptr< interfaces::Chain > chain, std::string name)
Access to the txindex database (indexes/txindex/).
BaseIndex::DB & GetDB() const override
bool CustomAppend(const interfaces::BlockInfo &block) override
Write update index entries for a newly connected block.
bool FindTx(const Txid &tx_hash, uint256 &block_hash, CTransactionRef &tx) const
Look up a transaction by hash.
TxIndex(std::unique_ptr< interfaces::Chain > chain, size_t n_cache_size, bool f_memory=false, bool f_wipe=false)
Constructs the index, which becomes available to be queried.
virtual ~TxIndex() override
bool AllowPrune() const override
const std::unique_ptr< DB > m_db
std::shared_ptr< const CTransaction > CTransactionRef
Block data sent with blockConnected, blockDisconnected notifications.
transaction_identifier< false > Txid
Txid commits to all transaction fields except the witness.
std::unique_ptr< TxIndex > g_txindex
The global transaction index, used in GetTransaction. May be null.
static constexpr bool DEFAULT_TXINDEX