5#ifndef BITCOIN_INDEX_COINSTATSINDEX_H
6#define BITCOIN_INDEX_COINSTATSINDEX_H
25 std::unique_ptr<BaseIndex::DB>
m_db;
46 bool CustomInit(
const std::optional<interfaces::BlockRef>& block)
override;
58 explicit CoinStatsIndex(std::unique_ptr<interfaces::Chain> chain,
size_t n_cache_size,
bool f_memory =
false,
bool f_wipe =
false);
int64_t CAmount
Amount in satoshis (Can be negative)
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.
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.
bool AllowPrune() const override
bool CustomInit(const std::optional< interfaces::BlockRef > &block) override
Initialize internal state from the database and block index.
CAmount m_total_unspendables_genesis_block
CAmount m_total_unspendable_amount
CAmount m_total_new_outputs_ex_coinbase_amount
CoinStatsIndex(std::unique_ptr< interfaces::Chain > chain, size_t n_cache_size, bool f_memory=false, bool f_wipe=false)
CAmount m_total_unspendables_scripts
uint64_t m_transaction_output_count
bool CustomAppend(const interfaces::BlockInfo &block) override
Write update index entries for a newly connected block.
CAmount m_total_prevout_spent_amount
bool ReverseBlock(const CBlock &block, const CBlockIndex *pindex)
std::optional< kernel::CCoinsStats > LookUpStats(const CBlockIndex &block_index) const
std::unique_ptr< BaseIndex::DB > m_db
bool CustomCommit(CDBBatch &batch) override
Virtual method called internally by Commit that can be overridden to atomically commit more index sta...
CAmount m_total_coinbase_amount
bool CustomRewind(const interfaces::BlockRef ¤t_tip, const interfaces::BlockRef &new_tip) override
Rewind index to an earlier chain tip during a chain reorg.
BaseIndex::DB & GetDB() const override
CAmount m_total_unspendables_bip30
CAmount m_total_unspendables_unclaimed_rewards
A class representing MuHash sets.
std::unique_ptr< CoinStatsIndex > g_coin_stats_index
The global UTXO set hash object.
static constexpr bool DEFAULT_COINSTATSINDEX
Block data sent with blockConnected, blockDisconnected notifications.
Hash/height pair to help track and identify blocks.