5#ifndef BITCOIN_INDEX_COINSTATSINDEX_H
6#define BITCOIN_INDEX_COINSTATSINDEX_H
24 std::unique_ptr<BaseIndex::DB>
m_db;
56 const char *
GetName()
const override {
return "coinstatsindex"; }
60 explicit CoinStatsIndex(
size_t n_cache_size,
bool f_memory =
false,
64 std::optional<kernel::CCoinsStats>
The database stores a block locator of the chain the database is synced to so that the TxIndex can ef...
Base class for indices of blockchain data.
The block chain is a tree shaped structure starting with the genesis block at the root,...
Batch of changes queued to be written to a CDBWrapper.
CoinStatsIndex maintains statistics on the UTXO set.
Amount m_total_prevout_spent_amount
Amount m_total_unspendables_bip30
const char * GetName() const override
Get the name of the index for display in logs.
bool AllowPrune() const override
bool CommitInternal(CDBBatch &batch) override
Virtual method called internally by Commit that can be overridden to atomically commit more index sta...
Amount m_total_unspendables_genesis_block
uint64_t m_transaction_output_count
bool Rewind(const CBlockIndex *current_tip, const CBlockIndex *new_tip) override
Rewind index to an earlier chain tip during a chain reorg.
Amount m_total_coinbase_amount
bool ReverseBlock(const CBlock &block, const CBlockIndex *pindex)
std::unique_ptr< BaseIndex::DB > m_db
CoinStatsIndex(size_t n_cache_size, bool f_memory=false, bool f_wipe=false)
std::optional< kernel::CCoinsStats > LookUpStats(const CBlockIndex *block_index) const
Amount m_total_unspendables_scripts
bool WriteBlock(const CBlock &block, const CBlockIndex *pindex) override
Write update index entries for a newly connected block.
Amount m_total_new_outputs_ex_coinbase_amount
Amount m_total_unspendable_amount
Amount m_total_unspendables_unclaimed_rewards
BaseIndex::DB & GetDB() const override
bool Init() override
Initialize internal state from the database and block index.
A class representing MuHash sets.
std::unique_ptr< CoinStatsIndex > g_coin_stats_index
The global UTXO set hash object.
static constexpr bool DEFAULT_COINSTATSINDEX
static constexpr Amount zero() noexcept