|
|
|
@ -28,6 +28,8 @@ namespace Checkpoints
@@ -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
@@ -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
@@ -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
@@ -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; |
|
|
|
|