mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
checkpoints: store mapCheckpoints in CCheckpointData rather than a pointer
This commit is contained in:
parent
8a10000222
commit
9f13a10548
3 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue