]>
Commit | Line | Data |
---|---|---|
db0e8ccd | 1 | // Copyright (c) 2009-2013 The Bitcoin developers |
eb5fff9e | 2 | // Distributed under the MIT/X11 software license, see the accompanying |
3a25a2b9 | 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. |
51ed9ec9 | 4 | |
eb5fff9e | 5 | #ifndef BITCOIN_CHECKPOINT_H |
69e07747 | 6 | #define BITCOIN_CHECKPOINT_H |
eb5fff9e | 7 | |
10fd7f66 | 8 | #include <map> |
10fd7f66 | 9 | |
10fd7f66 | 10 | class CBlockIndex; |
51ed9ec9 | 11 | class uint256; |
eb5fff9e | 12 | |
6b8de05d PW |
13 | /** Block-chain checkpoints are compiled-in sanity checks. |
14 | * They are updated every release or three. | |
15 | */ | |
20e01b1a PW |
16 | namespace Checkpoints |
17 | { | |
18 | // Returns true if block passes checkpoint checks | |
19 | bool CheckBlock(int nHeight, const uint256& hash); | |
e10dcf27 | 20 | |
20e01b1a PW |
21 | // Return conservative estimate of total number of blocks, 0 if unknown |
22 | int GetTotalBlocksEstimate(); | |
eb5fff9e | 23 | |
20e01b1a PW |
24 | // Returns last CBlockIndex* in mapBlockIndex that is a checkpoint |
25 | CBlockIndex* GetLastCheckpoint(); | |
10fd7f66 | 26 | |
20e01b1a | 27 | double GuessVerificationProgress(CBlockIndex* pindex, bool fSigchecks = true); |
9f2467ad | 28 | |
20e01b1a | 29 | extern bool fEnabled; |
e10dcf27 PK |
30 | |
31 | } //namespace Checkpoints | |
eb5fff9e | 32 | |
093303a8 | 33 | #endif // BITCOIN_CHECKPOINT_H |