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