Move checkpoint data selection to chainparams

This commit is contained in:
jtimon
2014-08-31 21:32:23 +02:00
parent 6de50c3c9a
commit e11712df7e
4 changed files with 89 additions and 78 deletions

View File

@@ -5,16 +5,26 @@
#ifndef BITCOIN_CHECKPOINT_H
#define BITCOIN_CHECKPOINT_H
#include "uint256.h"
#include <map>
class CBlockIndex;
class uint256;
/** Block-chain checkpoints are compiled-in sanity checks.
* They are updated every release or three.
*/
namespace Checkpoints
{
typedef std::map<int, uint256> MapCheckpoints;
struct CCheckpointData {
const MapCheckpoints *mapCheckpoints;
int64_t nTimeLastCheckpoint;
int64_t nTransactionsLastCheckpoint;
double fTransactionsPerDay;
};
// Returns true if block passes checkpoint checks
bool CheckBlock(int nHeight, const uint256& hash);