raw
genesis                 1 // Copyright (c) 2011 The Bitcoin developers
genesis 2 // Distributed under the MIT/X11 software license, see the accompanying
genesis 3 // file license.txt or http://www.opensource.org/licenses/mit-license.php.
genesis 4 #ifndef BITCOIN_CHECKPOINT_H
genesis 5 #define BITCOIN_CHECKPOINT_H
genesis 6
genesis 7 #include <map>
genesis 8 #include "util.h"
genesis 9
genesis 10 class uint256;
genesis 11 class CBlockIndex;
genesis 12
genesis 13 //
genesis 14 // Block-chain checkpoints are compiled-in sanity checks.
genesis 15 // They are updated every release or three.
genesis 16 //
genesis 17 namespace Checkpoints
genesis 18 {
genesis 19 // Returns true if block passes checkpoint checks
genesis 20 bool CheckBlock(int nHeight, const uint256& hash);
genesis 21
genesis 22 // Return conservative estimate of total number of blocks, 0 if unknown
genesis 23 int GetTotalBlocksEstimate();
genesis 24
genesis 25 // Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
genesis 26 CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex);
genesis 27 }
genesis 28
genesis 29 #endif