aboutsummaryrefslogtreecommitdiff
path: root/src/node/blockstorage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/node/blockstorage.h')
-rw-r--r--src/node/blockstorage.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/node/blockstorage.h b/src/node/blockstorage.h
index a963cad358..07ae223cbf 100644
--- a/src/node/blockstorage.h
+++ b/src/node/blockstorage.h
@@ -222,10 +222,15 @@ public:
//! Returns last CBlockIndex* that is a checkpoint
const CBlockIndex* GetLastCheckpoint(const CCheckpointData& data) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
+ //! Check if all blocks in the [upper_block, lower_block] range have data available.
+ //! The caller is responsible for ensuring that lower_block is an ancestor of upper_block
+ //! (part of the same chain).
+ bool CheckBlockDataAvailability(const CBlockIndex& upper_block LIFETIMEBOUND, const CBlockIndex& lower_block LIFETIMEBOUND) EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
+
//! Find the first stored ancestor of start_block immediately after the last
//! pruned ancestor. Return value will never be null. Caller is responsible
//! for ensuring that start_block has data is not pruned.
- const CBlockIndex* GetFirstStoredBlock(const CBlockIndex& start_block LIFETIMEBOUND) EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
+ const CBlockIndex* GetFirstStoredBlock(const CBlockIndex& start_block LIFETIMEBOUND, const CBlockIndex* lower_block=nullptr) EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
/** True if any block files have ever been pruned. */
bool m_have_pruned = false;