aboutsummaryrefslogtreecommitdiff
path: root/src/checkpoints.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <jonas.schnelli@include7.ch>2013-06-03 15:18:41 +0200
committerJonas Schnelli <jonas.schnelli@include7.ch>2013-06-03 15:18:41 +0200
commit39fe9de6b2b255969971beca8fa25a33ad2e5750 (patch)
tree6686041f6b801d0ea5185b026a480a5be61510e6 /src/checkpoints.cpp
parentf679b2900a3a9f863f888cfb0b1a5e593628e37b (diff)
parentfa9e5adddda0bee5adc040b957cf3f1a6a470802 (diff)
downloadbitcoin-39fe9de6b2b255969971beca8fa25a33ad2e5750.tar.xz
Merge branch 'master' of git://github.com/bitcoin/bitcoin into prefsFix
Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch> Conflicts: bitcoin-qt.pro
Diffstat (limited to 'src/checkpoints.cpp')
-rw-r--r--src/checkpoints.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index 9e8e0f7024..7643ec5df8 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -28,6 +28,8 @@ namespace Checkpoints
double fTransactionsPerDay;
};
+ bool fEnabled = true;
+
// What makes a good checkpoint block?
// + Is surrounded by blocks with reasonable timestamps
// (no blocks before with a timestamp after, none after with
@@ -74,7 +76,7 @@ namespace Checkpoints
bool CheckBlock(int nHeight, const uint256& hash)
{
- if (!GetBoolArg("-checkpoints", true))
+ if (!fEnabled)
return true;
const MapCheckpoints& checkpoints = *Checkpoints().mapCheckpoints;
@@ -117,7 +119,7 @@ namespace Checkpoints
int GetTotalBlocksEstimate()
{
- if (!GetBoolArg("-checkpoints", true))
+ if (!fEnabled)
return 0;
const MapCheckpoints& checkpoints = *Checkpoints().mapCheckpoints;
@@ -127,7 +129,7 @@ namespace Checkpoints
CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex)
{
- if (!GetBoolArg("-checkpoints", true))
+ if (!fEnabled)
return NULL;
const MapCheckpoints& checkpoints = *Checkpoints().mapCheckpoints;