From dce8360e44d5330cc9f9d09c9b09ac9237237204 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Thu, 19 Mar 2015 05:34:06 -0700 Subject: Reduce checkpoints' effect on consensus. Instead of only checking height to decide whether to disable script checks, actually check whether a block is an ancestor of a checkpoint, up to which headers have been validated. This means that we don't have to prevent accepting a side branch anymore - it will be safe, just less fast to do. We still need to prevent being fed a multitude of low-difficulty headers filling up our memory. The mechanism for that is unchanged for now: once a checkpoint is reached with headers, no headers chain branching off before that point are allowed anymore. --- src/checkpoints.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/checkpoints.cpp') diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index 2024486139..87f4ad7f2e 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -24,15 +24,6 @@ namespace Checkpoints { */ static const double SIGCHECK_VERIFICATION_FACTOR = 5.0; - bool CheckBlock(const CCheckpointData& data, int nHeight, const uint256& hash) - { - const MapCheckpoints& checkpoints = data.mapCheckpoints; - - MapCheckpoints::const_iterator i = checkpoints.find(nHeight); - if (i == checkpoints.end()) return true; - return hash == i->second; - } - //! Guess how far we are in the verification process at the given block index double GuessVerificationProgress(const CCheckpointData& data, CBlockIndex *pindex, bool fSigchecks) { if (pindex==NULL) -- cgit v1.2.3