diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-03-18 17:20:12 +0100 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-06-22 15:43:00 +0200 |
commit | 6032f6930a56c107dad8f30c05fec4aab79c8c22 (patch) | |
tree | 7fd79172fe0bb65ef533bfb24b00f567d2706930 /src/main.h | |
parent | b7dbeb24ebff16198b2925d906c06771e167bd9e (diff) |
Add rewind logic to deal with post-fork software updates
Includes logic for dealing with pruning by Suhas Daftuar.
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h index 317470e3c8..84a6044bc9 100644 --- a/src/main.h +++ b/src/main.h @@ -459,6 +459,9 @@ bool TestBlockValidity(CValidationState& state, const CChainParams& chainparams, /** Check whether witness commitments are required for block. */ bool IsWitnessEnabled(const CBlockIndex* pindexPrev, const Consensus::Params& params); +/** When there are blocks in the active chain with missing data, rewind the chainstate and remove them from the block index */ +bool RewindBlockIndex(const CChainParams& params); + /** Update uncommitted block structures (currently: only the witness nonce). This is safe for submitted blocks. */ void UpdateUncommittedBlockStructures(CBlock& block, const CBlockIndex* pindexPrev, const Consensus::Params& consensusParams); |