checkpoints: Decouple checkpoints from Params

Pass checkpoint data in as necessary
This commit is contained in:
Cory Fields
2015-04-22 18:19:11 -04:00
parent 699682304f
commit 11982d366d
7 changed files with 43 additions and 37 deletions

View File

@@ -27,15 +27,15 @@ struct CCheckpointData {
};
//! Returns true if block passes checkpoint checks
bool CheckBlock(int nHeight, const uint256& hash);
bool CheckBlock(const CCheckpointData& data, int nHeight, const uint256& hash);
//! Return conservative estimate of total number of blocks, 0 if unknown
int GetTotalBlocksEstimate();
int GetTotalBlocksEstimate(const CCheckpointData& data);
//! Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
CBlockIndex* GetLastCheckpoint();
CBlockIndex* GetLastCheckpoint(const CCheckpointData& data);
double GuessVerificationProgress(CBlockIndex* pindex, bool fSigchecks = true);
double GuessVerificationProgress(const CCheckpointData& data, CBlockIndex* pindex, bool fSigchecks = true);
extern bool fEnabled;