1 // Copyright (c) 2009-2012 The Bitcoin developers
2 // Distributed under the MIT/X11 software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 #ifndef BITCOIN_CHECKPOINT_H
5 #define BITCOIN_CHECKPOINT_H
13 /** Block-chain checkpoints are compiled-in sanity checks.
14 * They are updated every release or three.
18 // Returns true if block passes checkpoint checks
19 bool CheckBlock(int nHeight, const uint256& hash);
21 // Return conservative estimate of total number of blocks, 0 if unknown
22 int GetTotalBlocksEstimate();
24 // Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
25 CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex);