aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2015-04-22 17:55:00 -0400
committerCory Fields <cory-nospam-@coryfields.com>2015-04-30 23:14:08 -0400
commit9f13a10548bf77fb785a9c116234258275de6c04 (patch)
tree0b8ec1207e3056383e2681807c6e532db3ef80c5 /src
parent8a10000222cb49eb253b41802ecf312adaf79439 (diff)
checkpoints: store mapCheckpoints in CCheckpointData rather than a pointer
Diffstat (limited to 'src')
-rw-r--r--src/chainparams.cpp6
-rw-r--r--src/checkpoints.cpp6
-rw-r--r--src/checkpoints.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index a3434bd6e8..cc54ac13f5 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -43,7 +43,7 @@ static Checkpoints::MapCheckpoints mapCheckpoints =
(295000, uint256S("0x00000000000000004d9b4ef50f0f9d686fd69db2e03af35a100370c64632a983"))
;
static const Checkpoints::CCheckpointData data = {
- &mapCheckpoints,
+ mapCheckpoints,
1397080064, // * UNIX timestamp of last checkpoint block
36544669, // * total number of transactions between genesis and last checkpoint
// (the tx=... number in the SetBestChain debug.log lines)
@@ -55,7 +55,7 @@ static Checkpoints::MapCheckpoints mapCheckpointsTestnet =
( 546, uint256S("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70"))
;
static const Checkpoints::CCheckpointData dataTestnet = {
- &mapCheckpointsTestnet,
+ mapCheckpointsTestnet,
1337966069,
1488,
300
@@ -66,7 +66,7 @@ static Checkpoints::MapCheckpoints mapCheckpointsRegtest =
( 0, uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"))
;
static const Checkpoints::CCheckpointData dataRegtest = {
- &mapCheckpointsRegtest,
+ mapCheckpointsRegtest,
0,
0,
0
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index 71579bb309..97ea8e2fee 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -30,7 +30,7 @@ namespace Checkpoints {
if (!fEnabled)
return true;
- const MapCheckpoints& checkpoints = *Params().Checkpoints().mapCheckpoints;
+ const MapCheckpoints& checkpoints = Params().Checkpoints().mapCheckpoints;
MapCheckpoints::const_iterator i = checkpoints.find(nHeight);
if (i == checkpoints.end()) return true;
@@ -74,7 +74,7 @@ namespace Checkpoints {
if (!fEnabled)
return 0;
- const MapCheckpoints& checkpoints = *Params().Checkpoints().mapCheckpoints;
+ const MapCheckpoints& checkpoints = Params().Checkpoints().mapCheckpoints;
return checkpoints.rbegin()->first;
}
@@ -84,7 +84,7 @@ namespace Checkpoints {
if (!fEnabled)
return NULL;
- const MapCheckpoints& checkpoints = *Params().Checkpoints().mapCheckpoints;
+ const MapCheckpoints& checkpoints = Params().Checkpoints().mapCheckpoints;
BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, checkpoints)
{
diff --git a/src/checkpoints.h b/src/checkpoints.h
index 29dc5f83a9..9cccf4228a 100644
--- a/src/checkpoints.h
+++ b/src/checkpoints.h
@@ -20,7 +20,7 @@ namespace Checkpoints
typedef std::map<int, uint256> MapCheckpoints;
struct CCheckpointData {
- const MapCheckpoints *mapCheckpoints;
+ MapCheckpoints mapCheckpoints;
int64_t nTimeLastCheckpoint;
int64_t nTransactionsLastCheckpoint;
double fTransactionsPerDay;