aboutsummaryrefslogtreecommitdiff
path: root/src/checkpoints.cpp
diff options
context:
space:
mode:
authorRoy Badami <roy@gnomon.org.uk>2014-07-07 22:06:21 +0100
committerRoy Badami <roy@gnomon.org.uk>2014-07-07 22:06:21 +0100
commit96df327834af3b55918adfac9b3f65adfc960b3a (patch)
tree8bd199df46ea6f39f7094c0e7db2185b4d3f5d6d /src/checkpoints.cpp
parent2e4fee2ac4824570c1340a8f8fe2aed4580de879 (diff)
parent1fedd65fcf9ac04b70f0fa8cf6caa9629857d586 (diff)
downloadbitcoin-96df327834af3b55918adfac9b3f65adfc960b3a.tar.xz
Merge remote-tracking branch 'upstream/master'
Conflicts: src/qt/overviewpage.cpp src/qt/transactiondesc.cpp
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