]> Git Repo - VerusCoin.git/blob - src/checkpoints.h
test
[VerusCoin.git] / src / checkpoints.h
1 // Copyright (c) 2009-2014 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5 #ifndef BITCOIN_CHECKPOINTS_H
6 #define BITCOIN_CHECKPOINTS_H
7
8 #include "uint256.h"
9
10 #include <map>
11
12 class CBlockIndex;
13
14 /**
15  * Block-chain checkpoints are compiled-in sanity checks.
16  * They are updated every release or three.
17  */
18 namespace Checkpoints
19 {
20 typedef std::map<int, uint256> MapCheckpoints;
21
22 struct CCheckpointData {
23     MapCheckpoints mapCheckpoints;
24     int64_t nTimeLastCheckpoint;
25     int64_t nTransactionsLastCheckpoint;
26     double fTransactionsPerDay;
27 };
28
29 //! Returns true if block passes checkpoint checks
30 bool CheckBlock(const CCheckpointData& data, int nHeight, const uint256& hash);
31
32 //! Return conservative estimate of total number of blocks, 0 if unknown
33 int GetTotalBlocksEstimate(const CCheckpointData& data);
34
35 //! Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
36 CBlockIndex* GetLastCheckpoint(const CCheckpointData& data);
37
38 double GuessVerificationProgress(const CCheckpointData& data, CBlockIndex* pindex, bool fSigchecks = true);
39
40 } //namespace Checkpoints
41
42 #endif // BITCOIN_CHECKPOINTS_H
This page took 0.028126 seconds and 4 git commands to generate.