Anoncoin  0.9.4
P2P Digital Currency
checkpoints.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2013 The Bitcoin developers
2 // Copyright (c) 2013-2014 The Anoncoin Core developers
3 // Distributed under the MIT/X11 software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef ANONCOIN_CHECKPOINT_H
7 #define ANONCOIN_CHECKPOINT_H
8 
9 #include <map>
10 
11 class CBlockIndex;
12 class uint256;
13 
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
24 
25  // Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
26  CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex);
27 
28  double GuessVerificationProgress(CBlockIndex *pindex, bool fSigchecks = true);
29 
30  extern bool fEnabled;
31 }
32 
33 #endif
CBlockIndex * GetLastCheckpoint(const std::map< uint256, CBlockIndex * > &mapBlockIndex)
Block-chain checkpoints are compiled-in sanity checks.
Definition: checkpoints.cpp:16
int GetTotalBlocksEstimate()
bool CheckBlock(int nHeight, const uint256 &hash)
Definition: checkpoints.cpp:94
double GuessVerificationProgress(CBlockIndex *pindex, bool fSigchecks)
256-bit unsigned integer
Definition: uint256.h:532
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: main.h:698
map< uint256, CBlockIndex * > mapBlockIndex
Definition: main.cpp:42