aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-08-25 16:53:30 -0400
committerCarl Dong <contact@carldong.me>2021-01-28 14:15:26 -0500
commitf11d11600ddb0ddff6538250ae2a35df6112c3db (patch)
tree2a4f6863b2044a6bd8292670bccf911c80e56f1e /src/validation.h
parente4b95eefbc700ebc915bec312f77477ce3e87a7e (diff)
downloadbitcoin-f11d11600ddb0ddff6538250ae2a35df6112c3db.tar.xz
validation: Move GetLastCheckpoint to BlockManager
[META] This commit should be followed up by removing the comments and assertions meant only to show that the change is correct. GetLastCheckPoint mainly acts on BlockManager.
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/validation.h b/src/validation.h
index a58d06c194..d39c02f795 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -40,6 +40,7 @@ class CBlockIndex;
class CBlockTreeDB;
class CBlockUndo;
class CChainParams;
+class CCheckpointData;
class CInv;
class CConnman;
class CScriptCheck;
@@ -433,6 +434,9 @@ public:
/** Find the last common block between the parameter chain and a locator. */
CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
+ //! Returns last CBlockIndex* that is a checkpoint
+ CBlockIndex* GetLastCheckpoint(const CCheckpointData& data) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
+
/**
* Return the spend height, which is one more than the inputs.GetBestBlock().
* While checking, GetBestBlock() refers to the parent block. (protected by cs_main)