diff options
Diffstat (limited to 'src/index/coinstatsindex.h')
-rw-r--r-- | src/index/coinstatsindex.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/index/coinstatsindex.h b/src/index/coinstatsindex.h index c4af223388..aa0d7f9fd5 100644 --- a/src/index/coinstatsindex.h +++ b/src/index/coinstatsindex.h @@ -5,11 +5,16 @@ #ifndef BITCOIN_INDEX_COINSTATSINDEX_H #define BITCOIN_INDEX_COINSTATSINDEX_H -#include <chain.h> #include <crypto/muhash.h> -#include <flatfile.h> #include <index/base.h> -#include <kernel/coinstats.h> + +class CBlockIndex; +class CDBBatch; +namespace kernel { +struct CCoinsStats; +} + +static constexpr bool DEFAULT_COINSTATSINDEX{false}; /** * CoinStatsIndex maintains statistics on the UTXO set. @@ -17,7 +22,6 @@ class CoinStatsIndex final : public BaseIndex { private: - std::string m_name; std::unique_ptr<BaseIndex::DB> m_db; MuHash3072 m_muhash; @@ -49,14 +53,12 @@ protected: BaseIndex::DB& GetDB() const override { return *m_db; } - const char* GetName() const override { return "coinstatsindex"; } - public: // Constructs the index, which becomes available to be queried. explicit CoinStatsIndex(std::unique_ptr<interfaces::Chain> chain, size_t n_cache_size, bool f_memory = false, bool f_wipe = false); // Look up stats for a specific block using CBlockIndex - std::optional<kernel::CCoinsStats> LookUpStats(const CBlockIndex* block_index) const; + std::optional<kernel::CCoinsStats> LookUpStats(const CBlockIndex& block_index) const; }; /// The global UTXO set hash object. |