1 // Copyright (c) 2009-2014 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_CHECKPOINTS_H
6 #define BITCOIN_CHECKPOINTS_H
15 * Block-chain checkpoints are compiled-in sanity checks.
16 * They are updated every release or three.
20 typedef std::map<int, uint256> MapCheckpoints;
22 struct CCheckpointData {
23 MapCheckpoints mapCheckpoints;
24 int64_t nTimeLastCheckpoint;
25 int64_t nTransactionsLastCheckpoint;
26 double fTransactionsPerDay;
29 //! Return conservative estimate of total number of blocks, 0 if unknown
30 int GetTotalBlocksEstimate(const CCheckpointData& data);
32 //! Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
33 CBlockIndex* GetLastCheckpoint(const CCheckpointData& data);
35 double GuessVerificationProgress(const CCheckpointData& data, CBlockIndex* pindex, bool fSigchecks = true);
37 } //namespace Checkpoints
39 #endif // BITCOIN_CHECKPOINTS_H