5#ifndef BITCOIN_INDEX_TXINDEX_H
6#define BITCOIN_INDEX_TXINDEX_H
43 const std::unique_ptr<DB>
m_db;
The database stores a block locator of the chain the database is synced to so that the index can effi...
Base class for indices of blockchain data.
Access to the txindex database (indexes/txindex/)
TxIndex is used to look up transactions included in the blockchain by hash.
BaseIndex::DB & GetDB() const override
std::optional< TxIndexResult > FindTx(const Txid &tx_hash) const
Look up a transaction by hash.
bool CustomAppend(const interfaces::BlockInfo &block) override
Write update index entries for a newly connected block.
virtual ~TxIndex() override
bool AllowPrune() const override
const std::unique_ptr< DB > m_db
std::optional< TxIndexResult > FindLegacyTx(const Txid &tx_hash) const
Look up a transaction among the legacy (full-txid) entries.
friend class txindex_tests::TxIndexTest
std::shared_ptr< const CTransaction > CTransactionRef
A found transaction and the hash of the block that contains it.
Block data sent with blockConnected, blockDisconnected notifications.
constexpr bool DEFAULT_TXINDEX
std::unique_ptr< TxIndex > g_txindex
The global transaction index, used in GetTransaction. May be null.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.