5 #ifndef BITCOIN_INDEX_COINSTATSINDEX_H 6 #define BITCOIN_INDEX_COINSTATSINDEX_H 33 std::unique_ptr<BaseIndex::DB>
m_db;
55 bool CustomInit(
const std::optional<interfaces::BlockRef>& block)
override;
67 explicit CoinStatsIndex(std::unique_ptr<interfaces::Chain> chain,
size_t n_cache_size,
bool f_memory =
false,
bool f_wipe =
false);
78 #endif // BITCOIN_INDEX_COINSTATSINDEX_H bool RevertBlock(const interfaces::BlockInfo &block)
Batch of changes queued to be written to a CDBWrapper.
interfaces::Chain::NotifyOptions CustomOptions() override
Return custom notification options for index.
bool CustomCommit(CDBBatch &batch) override
Virtual method called internally by Commit that can be overridden to atomically commit more index sta...
bool CustomInit(const std::optional< interfaces::BlockRef > &block) override
Initialize internal state from the database and block index.
uint256 m_current_block_hash
arith_uint256 m_total_coinbase_amount
BaseIndex::DB & GetDB() const override
std::unique_ptr< BaseIndex::DB > m_db
CAmount m_total_unspendables_genesis_block
bool CustomAppend(const interfaces::BlockInfo &block) override
Write update index entries for a newly connected block.
The database stores a block locator of the chain the database is synced to so that the index can effi...
int64_t CAmount
Amount in satoshis (Can be negative)
Block data sent with blockConnected, blockDisconnected notifications.
Base class for indices of blockchain data.
Options specifying which chain notifications are required.
std::optional< kernel::CCoinsStats > LookUpStats(const CBlockIndex &block_index) const
CoinStatsIndex maintains statistics on the UTXO set.
static constexpr bool DEFAULT_COINSTATSINDEX
arith_uint256 m_total_new_outputs_ex_coinbase_amount
256-bit unsigned big integer.
The block chain is a tree shaped structure starting with the genesis block at the root...
bool AllowPrune() const override
A class representing MuHash sets.
std::unique_ptr< CoinStatsIndex > g_coin_stats_index
The global UTXO set hash object.
CoinStatsIndex(std::unique_ptr< interfaces::Chain > chain, size_t n_cache_size, bool f_memory=false, bool f_wipe=false)
uint64_t m_transaction_output_count
CAmount m_total_unspendables_unclaimed_rewards
CAmount m_total_unspendables_bip30
CAmount m_total_unspendables_scripts
arith_uint256 m_total_prevout_spent_amount
bool CustomRemove(const interfaces::BlockInfo &block) override
Rewind index by one block during a chain reorg.