Projects : bitcoin : bitcoin_dumpblock_no_losers
1 | // Copyright (c) 2011 The Bitcoin developers |
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 | |
7 | #include <map> |
8 | #include "util.h" |
9 | |
10 | class uint256; |
11 | class CBlockIndex; |
12 | |
13 | // |
14 | // Block-chain checkpoints are compiled-in sanity checks. |
15 | // They are updated every release or three. |
16 | // |
17 | namespace Checkpoints |
18 | { |
19 | // Returns true if block passes checkpoint checks |
20 | bool CheckBlock(int nHeight, const uint256& hash); |
21 | |
22 | // Return conservative estimate of total number of blocks, 0 if unknown |
23 | int GetTotalBlocksEstimate(); |
24 | |
25 | // Returns last CBlockIndex* in mapBlockIndex that is a checkpoint |
26 | CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex); |
27 | } |
28 | |
29 | #endif |