aboutsummaryrefslogtreecommitdiff
path: root/src/index/base.h
diff options
context:
space:
mode:
authorJim Posen <jim.posen@gmail.com>2018-08-27 15:26:29 -0700
committerJim Posen <jim.posen@gmail.com>2019-04-06 12:03:21 -0700
commit62b7a4f09409f60a35fc99ddb70f9199ac511a53 (patch)
treed1dcd104c38707ebb15efd1dcf2c7cc6bbc1cb39 /src/index/base.h
parent4368384f1d267b011e03a805f934f5c47e2ca1b2 (diff)
downloadbitcoin-62b7a4f09409f60a35fc99ddb70f9199ac511a53.tar.xz
index: Ensure block locator is not stale after chain reorg.
Diffstat (limited to 'src/index/base.h')
-rw-r--r--src/index/base.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/index/base.h b/src/index/base.h
index 77e614a3af..31acbed0c1 100644
--- a/src/index/base.h
+++ b/src/index/base.h
@@ -80,6 +80,10 @@ protected:
/// commit more index state.
virtual bool CommitInternal(CDBBatch& batch);
+ /// Rewind index to an earlier chain tip during a chain reorg. The tip must
+ /// be an ancestor of the current best block.
+ virtual bool Rewind(const CBlockIndex* current_tip, const CBlockIndex* new_tip);
+
virtual DB& GetDB() const = 0;
/// Get the name of the index for display in logs.