From d831e711cab83c70bf2ded62fe33f484844e73dd Mon Sep 17 00:00:00 2001 From: Dhruv Mehta <856960+dhruv@users.noreply.github.com> Date: Sun, 24 Jan 2021 15:14:15 -0800 Subject: [validation] RewindBlockIndex no longer needed Instead of rewinding blocks, we request that the user restarts with -reindex --- src/validation.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/validation.h') diff --git a/src/validation.h b/src/validation.h index 512b306219..3c7f593c82 100644 --- a/src/validation.h +++ b/src/validation.h @@ -722,7 +722,9 @@ public: /** Replay blocks that aren't fully applied to the database. */ bool ReplayBlocks(const CChainParams& params); - bool RewindBlockIndex(const CChainParams& params) LOCKS_EXCLUDED(cs_main); + + /** Whether the chain state needs to be redownloaded due to lack of witness data */ + [[nodiscard]] bool NeedsRedownload(const CChainParams& params) const EXCLUSIVE_LOCKS_REQUIRED(cs_main); /** Ensures we have a genesis block in the block tree, possibly writing one to disk. */ bool LoadGenesisBlock(const CChainParams& chainparams); @@ -769,9 +771,6 @@ private: bool RollforwardBlock(const CBlockIndex* pindex, CCoinsViewCache& inputs, const CChainParams& params) EXCLUSIVE_LOCKS_REQUIRED(cs_main); - //! Mark a block as not having block data - void EraseBlockData(CBlockIndex* index) EXCLUSIVE_LOCKS_REQUIRED(cs_main); - void CheckForkWarningConditions() EXCLUSIVE_LOCKS_REQUIRED(cs_main); void InvalidChainFound(CBlockIndex* pindexNew) EXCLUSIVE_LOCKS_REQUIRED(cs_main); -- cgit v1.2.3