Bitcoin ABC  0.24.7
P2P Digital Currency
checkpoints.cpp
Go to the documentation of this file.
1 // Copyright (c) 2020 The Bitcoin developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #include <chainparams.h>
6 #include <util/system.h>
7 
9  .mapCheckpoints = {
10  {11111, BlockHash::fromHex("0000000069e244f73d78e8fd29ba2fd2ed6"
11  "18bd6fa2ee92559f542fdb26e7c1d")},
12  {33333, BlockHash::fromHex("000000002dd5588a74784eaa7ab0507a18a"
13  "d16a236e7b1ce69f00d7ddfb5d0a6")},
14  {74000, BlockHash::fromHex("0000000000573993a3c9e41ce34471c079d"
15  "cf5f52a0e824a81e7f953b8661a20")},
16  {105000, BlockHash::fromHex("00000000000291ce28027faea320c8d2b0"
17  "54b2e0fe44a773f3eefb151d6bdc97")},
18  {134444, BlockHash::fromHex("00000000000005b12ffd4cd315cd34ffd4"
19  "a594f430ac814c91184a0d42d2b0fe")},
20  {168000, BlockHash::fromHex("000000000000099e61ea72015e79632f21"
21  "6fe6cb33d7899acb35b75c8303b763")},
22  {193000, BlockHash::fromHex("000000000000059f452a5f7340de6682a9"
23  "77387c17010ff6e6c3bd83ca8b1317")},
24  {210000, BlockHash::fromHex("000000000000048b95347e83192f69cf03"
25  "66076336c639f9b7228e9ba171342e")},
26  {216116, BlockHash::fromHex("00000000000001b4f4b433e81ee46494af"
27  "945cf96014816a4e2370f11b23df4e")},
28  {225430, BlockHash::fromHex("00000000000001c108384350f74090433e"
29  "7fcf79a606b8e797f065b130575932")},
30  {250000, BlockHash::fromHex("000000000000003887df1f29024b06fc22"
31  "00b55f8af8f35453d7be294df2d214")},
32  {279000, BlockHash::fromHex("0000000000000001ae8c72a0b0c301f67e"
33  "3afca10e819efa9041e458e9bd7e40")},
34  {295000, BlockHash::fromHex("00000000000000004d9b4ef50f0f9d686f"
35  "d69db2e03af35a100370c64632a983")},
36  // UAHF fork block.
37  {478558, BlockHash::fromHex("0000000000000000011865af4122fe3b14"
38  "4e2cbeea86142e8ff2fb4107352d43")},
39  // Nov, 13 DAA activation block.
40  {504031, BlockHash::fromHex("0000000000000000011ebf65b60d0a3de8"
41  "0b8175be709d653b4c1a1beeb6ab9c")},
42  // Monolith activation.
43  {530359, BlockHash::fromHex("0000000000000000011ada8bd08f46074f"
44  "44a8f155396f43e38acf9501c49103")},
45  // Magnetic anomaly activation.
46  {556767, BlockHash::fromHex("0000000000000000004626ff6e3b936941"
47  "d341c5932ece4357eeccac44e6d56c")},
48  // Great wall activation.
49  {582680, BlockHash::fromHex("000000000000000001b4b8e36aec7d4f96"
50  "71a47872cb9a74dc16ca398c7dcc18")},
51  // Graviton activation.
52  {609136, BlockHash::fromHex("000000000000000000b48bb207faac5ac6"
53  "55c313e41ac909322eaa694f5bc5b1")},
54  // Phonon activation.
55  {635259, BlockHash::fromHex("00000000000000000033dfef1fc2d6a5d5"
56  "520b078c55193a9bf498c5b27530f7")},
57  // Axion activation.
58  {661648, BlockHash::fromHex("000000000000000004284c9d8b2c8ff731efeaec6b"
59  "e50729bdc9bd07f910757d")},
60  {664198, BlockHash::fromHex("00000000000000000c2f90578cede892ff39592cce"
61  "34b2fb89b6d2a122468260")},
62  {680140, BlockHash::fromHex("0000000000000000232c48568b63451d4ac445210"
63  "9aa46f8b38c65c3f62f7c0b")},
64  // Tachyon activation
65  {686621, BlockHash::fromHex("00000000000000003c8fe6f7570a9f6d5480dcfc9"
66  "5f8228ae9d60b98bee5b745")},
67  // Selectron activation.
68  {713661, BlockHash::fromHex("00000000000000000676f84307c7ccb53a0f19083f"
69  "eace753cb73a38eaaaef8d")},
70  }};
71 
73  .mapCheckpoints = {
74  {546, BlockHash::fromHex("000000002a936ca763904c3c35fce2f3556c5"
75  "59c0214345d31b1bcebf76acb70")},
76  // UAHF fork block.
77  {1155875,
78  BlockHash::fromHex("00000000f17c850672894b9a75b63a1e72830bbd5f"
79  "4c8889b5c1a80e7faef138")},
80  // Nov, 13. DAA activation block.
81  {1188697,
82  BlockHash::fromHex("0000000000170ed0918077bde7b4d36cc4c91be69f"
83  "a09211f748240dabe047fb")},
84  // Great wall activation.
85  {1303885,
86  BlockHash::fromHex("00000000000000479138892ef0e4fa478ccc938fb9"
87  "4df862ef5bde7e8dee23d3")},
88  // Graviton activation.
89  {1341712,
90  BlockHash::fromHex("00000000fffc44ea2e202bd905a9fbbb9491ef9e9d"
91  "5a9eed4039079229afa35b")},
92  // Phonon activation.
93  {1378461,
94  BlockHash::fromHex("0000000099f5509b5f36b1926bcf82b21d936ebeade"
95  "e811030dfbbb7fae915d7")},
96  // Axion activation.
97  {1421481, BlockHash::fromHex("00000000062c7f32591d883c99fc89ebe74a83287"
98  "c0f2b7ffeef72e62217d40b")},
99  // Tachyon activation.
100  {1450540, BlockHash::fromHex("00000000001085419e7328a2bacaf6216dd913c40"
101  "0f0b7da4bde43a8ebf6ed4e")},
102  // Selectron activation.
103  {1477500, BlockHash::fromHex("000000000004057554e6f83253e3080774c37ae8a"
104  "940ffbc38d77525274709ae")},
105  }};
106 
108  .mapCheckpoints = {
109  {0, BlockHash::fromHex("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb4"
110  "36012afca590b1a11466e2206")},
111  }};
112 
113 const CCheckpointData &CheckpointData(const std::string &chain) {
114  if (chain == CBaseChainParams::MAIN) {
115  return mainNetCheckpointData;
116  }
117  if (chain == CBaseChainParams::TESTNET) {
118  return testNetCheckpointData;
119  }
120  if (chain == CBaseChainParams::REGTEST) {
121  return regTestCheckpointData;
122  }
123 
124  throw std::runtime_error(
125  strprintf("%s: Unknown chain %s.", __func__, chain));
126 }
testNetCheckpointData
static CCheckpointData testNetCheckpointData
Definition: checkpoints.cpp:72
CBaseChainParams::TESTNET
static const std::string TESTNET
Definition: chainparamsbase.h:22
CCheckpointData::mapCheckpoints
MapCheckpoints mapCheckpoints
Definition: chainparams.h:25
chainparams.h
regTestCheckpointData
static CCheckpointData regTestCheckpointData
Definition: checkpoints.cpp:107
CBaseChainParams::REGTEST
static const std::string REGTEST
Definition: chainparamsbase.h:23
BlockHash::fromHex
static BlockHash fromHex(const std::string &str)
Definition: blockhash.h:17
CCheckpointData
Definition: chainparams.h:24
CBaseChainParams::MAIN
static const std::string MAIN
BIP70 chain name strings (main, test or regtest)
Definition: chainparamsbase.h:21
system.h
strprintf
#define strprintf
Format arguments and return the string or write to given std::ostream (see tinyformat::format doc for...
Definition: tinyformat.h:1201
CheckpointData
const CCheckpointData & CheckpointData(const std::string &chain)
Definition: checkpoints.cpp:113
mainNetCheckpointData
static CCheckpointData mainNetCheckpointData
Definition: checkpoints.cpp:8