mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-07 13:18:43 +02:00
index: Check availability of undo data for indices
This commit is contained in:
@@ -122,9 +122,6 @@ protected:
|
||||
|
||||
void ChainStateFlushed(const kernel::ChainstateRole& role, const CBlockLocator& locator) override;
|
||||
|
||||
/// Return custom notification options for index.
|
||||
[[nodiscard]] virtual interfaces::Chain::NotifyOptions CustomOptions() { return {}; }
|
||||
|
||||
/// Initialize internal state from the database and block index.
|
||||
[[nodiscard]] virtual bool CustomInit(const std::optional<interfaces::BlockRef>& block) { return true; }
|
||||
|
||||
@@ -151,6 +148,9 @@ public:
|
||||
/// Get the name of the index for display in logs.
|
||||
const std::string& GetName() const LIFETIMEBOUND { return m_name; }
|
||||
|
||||
/// Return custom notification options for index.
|
||||
[[nodiscard]] virtual interfaces::Chain::NotifyOptions CustomOptions() { return {}; }
|
||||
|
||||
/// Blocks the current thread until the index is caught up to the current
|
||||
/// state of the block chain. This only blocks if the index has gotten in
|
||||
/// sync once and only needs to process blocks in the ValidationInterface
|
||||
|
||||
@@ -63,8 +63,6 @@ private:
|
||||
std::optional<uint256> ReadFilterHeader(int height, const uint256& expected_block_hash);
|
||||
|
||||
protected:
|
||||
interfaces::Chain::NotifyOptions CustomOptions() override;
|
||||
|
||||
bool CustomInit(const std::optional<interfaces::BlockRef>& block) override;
|
||||
|
||||
bool CustomCommit(CDBBatch& batch) override;
|
||||
@@ -80,6 +78,8 @@ public:
|
||||
explicit BlockFilterIndex(std::unique_ptr<interfaces::Chain> chain, BlockFilterType filter_type,
|
||||
size_t n_cache_size, bool f_memory = false, bool f_wipe = false);
|
||||
|
||||
interfaces::Chain::NotifyOptions CustomOptions() override;
|
||||
|
||||
BlockFilterType GetFilterType() const { return m_filter_type; }
|
||||
|
||||
/** Get a single filter by block. */
|
||||
|
||||
@@ -52,8 +52,6 @@ private:
|
||||
bool AllowPrune() const override { return true; }
|
||||
|
||||
protected:
|
||||
interfaces::Chain::NotifyOptions CustomOptions() override;
|
||||
|
||||
bool CustomInit(const std::optional<interfaces::BlockRef>& block) override;
|
||||
|
||||
bool CustomCommit(CDBBatch& batch) override;
|
||||
@@ -68,6 +66,8 @@ 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);
|
||||
|
||||
interfaces::Chain::NotifyOptions CustomOptions() override;
|
||||
|
||||
// Look up stats for a specific block using CBlockIndex
|
||||
std::optional<kernel::CCoinsStats> LookUpStats(const CBlockIndex& block_index) const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user