diff options
author | Dhruv Mehta <856960+dhruv@users.noreply.github.com> | 2021-01-24 15:14:15 -0800 |
---|---|---|
committer | Dhruv Mehta <856960+dhruv@users.noreply.github.com> | 2021-04-21 16:09:14 -0700 |
commit | d831e711cab83c70bf2ded62fe33f484844e73dd (patch) | |
tree | 10c6e33cf3a3814dd73ec186d442d217800cb149 /src/validation.h | |
parent | 92cf3a22e3c79ce28c5cc9dcbc18348c43cbe4d9 (diff) |
[validation] RewindBlockIndex no longer needed
Instead of rewinding blocks, we request that the user restarts with
-reindex
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 7 |
1 files changed, 3 insertions, 4 deletions
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); |