aboutsummaryrefslogtreecommitdiff
path: root/src/checkpoints.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/checkpoints.cpp')
-rw-r--r--src/checkpoints.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index 9ab8b68443..4cab11db3d 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -12,8 +12,8 @@
#include <boost/assign/list_of.hpp> // for 'map_list_of()'
#include <boost/foreach.hpp>
-namespace Checkpoints
-{
+namespace Checkpoints {
+
typedef std::map<int, uint256> MapCheckpoints;
// How many times we expect transactions after the last checkpoint to
@@ -66,8 +66,8 @@ namespace Checkpoints
;
static const CCheckpointData dataTestnet = {
&mapCheckpointsTestnet,
- 1338180505,
- 16341,
+ 1337966069,
+ 1488,
300
};
@@ -83,9 +83,9 @@ namespace Checkpoints
};
const CCheckpointData &Checkpoints() {
- if (Params().NetworkID() == CChainParams::TESTNET)
+ if (Params().NetworkID() == CBaseChainParams::TESTNET)
return dataTestnet;
- else if (Params().NetworkID() == CChainParams::MAIN)
+ else if (Params().NetworkID() == CBaseChainParams::MAIN)
return data;
else
return dataRegtest;
@@ -127,7 +127,7 @@ namespace Checkpoints
} else {
double nCheapBefore = data.nTransactionsLastCheckpoint;
double nExpensiveBefore = pindex->nChainTx - data.nTransactionsLastCheckpoint;
- double nExpensiveAfter = (nNow - pindex->nTime)/86400.0*data.fTransactionsPerDay;
+ double nExpensiveAfter = (nNow - pindex->GetBlockTime())/86400.0*data.fTransactionsPerDay;
fWorkBefore = nCheapBefore + nExpensiveBefore*fSigcheckVerificationFactor;
fWorkAfter = nExpensiveAfter*fSigcheckVerificationFactor;
}
@@ -161,4 +161,5 @@ namespace Checkpoints
}
return NULL;
}
-}
+
+} // namespace Checkpoints