Changeset View
Changeset View
Standalone View
Standalone View
src/chainparams.cpp
Show First 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | |||||
public: | public: | ||||
CMainParams() { | CMainParams() { | ||||
strNetworkID = "main"; | strNetworkID = "main"; | ||||
consensus.nSubsidyHalvingInterval = 210000; | consensus.nSubsidyHalvingInterval = 210000; | ||||
// 00000000000000ce80a7e057163a4db1d5ad7b20fb6f598c9597b9665c8fb0d4 - | // 00000000000000ce80a7e057163a4db1d5ad7b20fb6f598c9597b9665c8fb0d4 - | ||||
// April 1, 2012 | // April 1, 2012 | ||||
consensus.BIP16Height = 173805; | consensus.BIP16Height = 173805; | ||||
consensus.BIP34Height = 227931; | consensus.BIP34Height = 227931; | ||||
consensus.BIP34Hash = uint256S( | consensus.BIP34Hash = BlockHash::fromHex( | ||||
"000000000000024b89b42a942fe0d9fea3bb44ab7bd1b19115dd6a759c0808b8"); | "000000000000024b89b42a942fe0d9fea3bb44ab7bd1b19115dd6a759c0808b8"); | ||||
// 000000000000000004c2b624ed5d7756c508d90fd0da2c7c679febfa6c4735f0 | // 000000000000000004c2b624ed5d7756c508d90fd0da2c7c679febfa6c4735f0 | ||||
consensus.BIP65Height = 388381; | consensus.BIP65Height = 388381; | ||||
// 00000000000000000379eaa19dce8c9b722d46ae6a57c2f1a988119488b50931 | // 00000000000000000379eaa19dce8c9b722d46ae6a57c2f1a988119488b50931 | ||||
consensus.BIP66Height = 363725; | consensus.BIP66Height = 363725; | ||||
// 000000000000000004a1b34462cb8aeebd5799177f7a29cf28f2d1961716b5b5 | // 000000000000000004a1b34462cb8aeebd5799177f7a29cf28f2d1961716b5b5 | ||||
consensus.CSVHeight = 419328; | consensus.CSVHeight = 419328; | ||||
consensus.powLimit = uint256S( | consensus.powLimit = uint256S( | ||||
▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | CMainParams() { | ||||
pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main)); | pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main)); | ||||
fDefaultConsistencyChecks = false; | fDefaultConsistencyChecks = false; | ||||
fRequireStandard = true; | fRequireStandard = true; | ||||
fMineBlocksOnDemand = false; | fMineBlocksOnDemand = false; | ||||
checkpointData = { | checkpointData = { | ||||
.mapCheckpoints = { | .mapCheckpoints = { | ||||
{11111, uint256S("0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee" | {11111, BlockHash::fromHex("0000000069e244f73d78e8fd29ba2fd2ed6" | ||||
"92559f542fdb26e7c1d")}, | "18bd6fa2ee92559f542fdb26e7c1d")}, | ||||
{33333, uint256S("000000002dd5588a74784eaa7ab0507a18ad16a236e7b" | {33333, BlockHash::fromHex("000000002dd5588a74784eaa7ab0507a18a" | ||||
"1ce69f00d7ddfb5d0a6")}, | "d16a236e7b1ce69f00d7ddfb5d0a6")}, | ||||
{74000, uint256S("0000000000573993a3c9e41ce34471c079dcf5f52a0e8" | {74000, BlockHash::fromHex("0000000000573993a3c9e41ce34471c079d" | ||||
"24a81e7f953b8661a20")}, | "cf5f52a0e824a81e7f953b8661a20")}, | ||||
{105000, uint256S("00000000000291ce28027faea320c8d2b054b2e0fe44" | {105000, BlockHash::fromHex("00000000000291ce28027faea320c8d2b0" | ||||
"a773f3eefb151d6bdc97")}, | "54b2e0fe44a773f3eefb151d6bdc97")}, | ||||
{134444, uint256S("00000000000005b12ffd4cd315cd34ffd4a594f430ac" | {134444, BlockHash::fromHex("00000000000005b12ffd4cd315cd34ffd4" | ||||
"814c91184a0d42d2b0fe")}, | "a594f430ac814c91184a0d42d2b0fe")}, | ||||
{168000, uint256S("000000000000099e61ea72015e79632f216fe6cb33d7" | {168000, BlockHash::fromHex("000000000000099e61ea72015e79632f21" | ||||
"899acb35b75c8303b763")}, | "6fe6cb33d7899acb35b75c8303b763")}, | ||||
{193000, uint256S("000000000000059f452a5f7340de6682a977387c1701" | {193000, BlockHash::fromHex("000000000000059f452a5f7340de6682a9" | ||||
"0ff6e6c3bd83ca8b1317")}, | "77387c17010ff6e6c3bd83ca8b1317")}, | ||||
{210000, uint256S("000000000000048b95347e83192f69cf0366076336c6" | {210000, BlockHash::fromHex("000000000000048b95347e83192f69cf03" | ||||
"39f9b7228e9ba171342e")}, | "66076336c639f9b7228e9ba171342e")}, | ||||
{216116, uint256S("00000000000001b4f4b433e81ee46494af945cf96014" | {216116, BlockHash::fromHex("00000000000001b4f4b433e81ee46494af" | ||||
"816a4e2370f11b23df4e")}, | "945cf96014816a4e2370f11b23df4e")}, | ||||
{225430, uint256S("00000000000001c108384350f74090433e7fcf79a606" | {225430, BlockHash::fromHex("00000000000001c108384350f74090433e" | ||||
"b8e797f065b130575932")}, | "7fcf79a606b8e797f065b130575932")}, | ||||
{250000, uint256S("000000000000003887df1f29024b06fc2200b55f8af8" | {250000, BlockHash::fromHex("000000000000003887df1f29024b06fc22" | ||||
"f35453d7be294df2d214")}, | "00b55f8af8f35453d7be294df2d214")}, | ||||
{279000, uint256S("0000000000000001ae8c72a0b0c301f67e3afca10e81" | {279000, BlockHash::fromHex("0000000000000001ae8c72a0b0c301f67e" | ||||
"9efa9041e458e9bd7e40")}, | "3afca10e819efa9041e458e9bd7e40")}, | ||||
{295000, uint256S("00000000000000004d9b4ef50f0f9d686fd69db2e03a" | {295000, BlockHash::fromHex("00000000000000004d9b4ef50f0f9d686f" | ||||
"f35a100370c64632a983")}, | "d69db2e03af35a100370c64632a983")}, | ||||
// UAHF fork block. | // UAHF fork block. | ||||
{478558, uint256S("0000000000000000011865af4122fe3b144e2cbeea86" | {478558, BlockHash::fromHex("0000000000000000011865af4122fe3b14" | ||||
"142e8ff2fb4107352d43")}, | "4e2cbeea86142e8ff2fb4107352d43")}, | ||||
// Nov, 13 DAA activation block. | // Nov, 13 DAA activation block. | ||||
{504031, uint256S("0000000000000000011ebf65b60d0a3de80b8175be70" | {504031, BlockHash::fromHex("0000000000000000011ebf65b60d0a3de8" | ||||
"9d653b4c1a1beeb6ab9c")}, | "0b8175be709d653b4c1a1beeb6ab9c")}, | ||||
// Monolith activation. | // Monolith activation. | ||||
{530359, uint256S("0000000000000000011ada8bd08f46074f44a8f15539" | {530359, BlockHash::fromHex("0000000000000000011ada8bd08f46074f" | ||||
"6f43e38acf9501c49103")}, | "44a8f155396f43e38acf9501c49103")}, | ||||
// Magnetic anomaly activation. | // Magnetic anomaly activation. | ||||
{556767, uint256S("0000000000000000004626ff6e3b936941d341c5932e" | {556767, BlockHash::fromHex("0000000000000000004626ff6e3b936941" | ||||
"ce4357eeccac44e6d56c")}, | "d341c5932ece4357eeccac44e6d56c")}, | ||||
// Great wall activation. | // Great wall activation. | ||||
{582680, uint256S("000000000000000001b4b8e36aec7d4f9671a47872cb" | {582680, BlockHash::fromHex("000000000000000001b4b8e36aec7d4f96" | ||||
"9a74dc16ca398c7dcc18")}, | "71a47872cb9a74dc16ca398c7dcc18")}, | ||||
// Graviton activation. | // Graviton activation. | ||||
{609136, uint256S("000000000000000000b48bb207faac5ac655c313e41a" | {609136, BlockHash::fromHex("000000000000000000b48bb207faac5ac6" | ||||
"c909322eaa694f5bc5b1")}, | "55c313e41ac909322eaa694f5bc5b1")}, | ||||
}}; | }}; | ||||
// Data as of block | // Data as of block | ||||
// 000000000000000001d2ce557406b017a928be25ee98906397d339c3f68eec5d | // 000000000000000001d2ce557406b017a928be25ee98906397d339c3f68eec5d | ||||
// (height 523992). | // (height 523992). | ||||
chainTxData = ChainTxData{ | chainTxData = ChainTxData{ | ||||
// UNIX timestamp of last known number of transactions. | // UNIX timestamp of last known number of transactions. | ||||
1522608016, | 1522608016, | ||||
Show All 11 Lines | |||||
class CTestNetParams : public CChainParams { | class CTestNetParams : public CChainParams { | ||||
public: | public: | ||||
CTestNetParams() { | CTestNetParams() { | ||||
strNetworkID = "test"; | strNetworkID = "test"; | ||||
consensus.nSubsidyHalvingInterval = 210000; | consensus.nSubsidyHalvingInterval = 210000; | ||||
// 00000000040b4e986385315e14bee30ad876d8b47f748025b26683116d21aa65 | // 00000000040b4e986385315e14bee30ad876d8b47f748025b26683116d21aa65 | ||||
consensus.BIP16Height = 514; | consensus.BIP16Height = 514; | ||||
consensus.BIP34Height = 21111; | consensus.BIP34Height = 21111; | ||||
consensus.BIP34Hash = uint256S( | consensus.BIP34Hash = BlockHash::fromHex( | ||||
"0000000023b3a96d3484e5abb3755c413e7d41500f8e2a5c3f0dd01299cd8ef8"); | "0000000023b3a96d3484e5abb3755c413e7d41500f8e2a5c3f0dd01299cd8ef8"); | ||||
// 00000000007f6655f22f98e72ed80d8b06dc761d5da09df0fa1dc4be4f861eb6 | // 00000000007f6655f22f98e72ed80d8b06dc761d5da09df0fa1dc4be4f861eb6 | ||||
consensus.BIP65Height = 581885; | consensus.BIP65Height = 581885; | ||||
// 000000002104c8c45e99a8853285a3b592602a3ccde2b832481da85e9e4ba182 | // 000000002104c8c45e99a8853285a3b592602a3ccde2b832481da85e9e4ba182 | ||||
consensus.BIP66Height = 330776; | consensus.BIP66Height = 330776; | ||||
// 00000000025e930139bac5c6c31a403776da130831ab85be56578f3fa75369bb | // 00000000025e930139bac5c6c31a403776da130831ab85be56578f3fa75369bb | ||||
consensus.CSVHeight = 770112; | consensus.CSVHeight = 770112; | ||||
consensus.powLimit = uint256S( | consensus.powLimit = uint256S( | ||||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | CTestNetParams() { | ||||
pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test)); | pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test)); | ||||
fDefaultConsistencyChecks = false; | fDefaultConsistencyChecks = false; | ||||
fRequireStandard = false; | fRequireStandard = false; | ||||
fMineBlocksOnDemand = false; | fMineBlocksOnDemand = false; | ||||
checkpointData = { | checkpointData = { | ||||
.mapCheckpoints = { | .mapCheckpoints = { | ||||
{546, uint256S("000000002a936ca763904c3c35fce2f3556c559c0214345" | {546, BlockHash::fromHex("000000002a936ca763904c3c35fce2f3556c5" | ||||
"d31b1bcebf76acb70")}, | "59c0214345d31b1bcebf76acb70")}, | ||||
// UAHF fork block. | // UAHF fork block. | ||||
{1155875, uint256S("00000000f17c850672894b9a75b63a1e72830bbd5f4" | {1155875, | ||||
"c8889b5c1a80e7faef138")}, | BlockHash::fromHex("00000000f17c850672894b9a75b63a1e72830bbd5f" | ||||
"4c8889b5c1a80e7faef138")}, | |||||
// Nov, 13. DAA activation block. | // Nov, 13. DAA activation block. | ||||
{1188697, uint256S("0000000000170ed0918077bde7b4d36cc4c91be69fa" | {1188697, | ||||
"09211f748240dabe047fb")}, | BlockHash::fromHex("0000000000170ed0918077bde7b4d36cc4c91be69f" | ||||
"a09211f748240dabe047fb")}, | |||||
// Great wall activation. | // Great wall activation. | ||||
{1303885, uint256S("00000000000000479138892ef0e4fa478ccc938fb94" | {1303885, | ||||
"df862ef5bde7e8dee23d3")}, | BlockHash::fromHex("00000000000000479138892ef0e4fa478ccc938fb9" | ||||
"4df862ef5bde7e8dee23d3")}, | |||||
// Graviton activation. | // Graviton activation. | ||||
{1341712, uint256S("00000000fffc44ea2e202bd905a9fbbb9491ef9e9d5" | {1341712, | ||||
"a9eed4039079229afa35b")}, | BlockHash::fromHex("00000000fffc44ea2e202bd905a9fbbb9491ef9e9d" | ||||
"5a9eed4039079229afa35b")}, | |||||
}}; | }}; | ||||
// Data as of block | // Data as of block | ||||
// 000000000005b07ecf85563034d13efd81c1a29e47e22b20f4fc6919d5b09cd6 | // 000000000005b07ecf85563034d13efd81c1a29e47e22b20f4fc6919d5b09cd6 | ||||
// (height 1223263) | // (height 1223263) | ||||
chainTxData = ChainTxData{1522608381, 15052068, 0.15}; | chainTxData = ChainTxData{1522608381, 15052068, 0.15}; | ||||
} | } | ||||
}; | }; | ||||
/** | /** | ||||
* Regression test | * Regression test | ||||
*/ | */ | ||||
class CRegTestParams : public CChainParams { | class CRegTestParams : public CChainParams { | ||||
public: | public: | ||||
CRegTestParams() { | CRegTestParams() { | ||||
strNetworkID = "regtest"; | strNetworkID = "regtest"; | ||||
consensus.nSubsidyHalvingInterval = 150; | consensus.nSubsidyHalvingInterval = 150; | ||||
// always enforce P2SH BIP16 on regtest | // always enforce P2SH BIP16 on regtest | ||||
consensus.BIP16Height = 0; | consensus.BIP16Height = 0; | ||||
// BIP34 has not activated on regtest (far in the future so block v1 are | // BIP34 has not activated on regtest (far in the future so block v1 are | ||||
// not rejected in tests) | // not rejected in tests) | ||||
consensus.BIP34Height = 100000000; | consensus.BIP34Height = 100000000; | ||||
consensus.BIP34Hash = uint256(); | consensus.BIP34Hash = BlockHash(); | ||||
// BIP65 activated on regtest (Used in rpc activation tests) | // BIP65 activated on regtest (Used in rpc activation tests) | ||||
consensus.BIP65Height = 1351; | consensus.BIP65Height = 1351; | ||||
// BIP66 activated on regtest (Used in rpc activation tests) | // BIP66 activated on regtest (Used in rpc activation tests) | ||||
consensus.BIP66Height = 1251; | consensus.BIP66Height = 1251; | ||||
// CSV activated on regtest (Used in rpc activation tests) | // CSV activated on regtest (Used in rpc activation tests) | ||||
consensus.CSVHeight = 576; | consensus.CSVHeight = 576; | ||||
consensus.powLimit = uint256S( | consensus.powLimit = uint256S( | ||||
"7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); | "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); | ||||
// two weeks | // two weeks | ||||
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; | consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; | ||||
consensus.nPowTargetSpacing = 10 * 60; | consensus.nPowTargetSpacing = 10 * 60; | ||||
consensus.fPowAllowMinDifficultyBlocks = true; | consensus.fPowAllowMinDifficultyBlocks = true; | ||||
consensus.fPowNoRetargeting = true; | consensus.fPowNoRetargeting = true; | ||||
// The best chain should have at least this much work. | // The best chain should have at least this much work. | ||||
consensus.nMinimumChainWork = uint256S("0x00"); | consensus.nMinimumChainWork = uint256S("0x00"); | ||||
// By default assume that the signatures in ancestors of this block are | // By default assume that the signatures in ancestors of this block are | ||||
// valid. | // valid. | ||||
consensus.defaultAssumeValid = uint256S("0x00"); | consensus.defaultAssumeValid = BlockHash(); | ||||
// UAHF is always enabled on regtest. | // UAHF is always enabled on regtest. | ||||
consensus.uahfHeight = 0; | consensus.uahfHeight = 0; | ||||
// November 13, 2017 hard fork is always on on regtest. | // November 13, 2017 hard fork is always on on regtest. | ||||
consensus.daaHeight = 0; | consensus.daaHeight = 0; | ||||
// November 15, 2018 hard fork is always on on regtest. | // November 15, 2018 hard fork is always on on regtest. | ||||
Show All 29 Lines | CRegTestParams() { | ||||
vFixedSeeds.clear(); | vFixedSeeds.clear(); | ||||
//!< Regtest mode doesn't have any DNS seeds. | //!< Regtest mode doesn't have any DNS seeds. | ||||
vSeeds.clear(); | vSeeds.clear(); | ||||
fDefaultConsistencyChecks = true; | fDefaultConsistencyChecks = true; | ||||
fRequireStandard = false; | fRequireStandard = false; | ||||
fMineBlocksOnDemand = true; | fMineBlocksOnDemand = true; | ||||
checkpointData = {.mapCheckpoints = { | checkpointData = { | ||||
{0, uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5" | .mapCheckpoints = { | ||||
"beb436012afca590b1a11466e2206")}, | {0, BlockHash::fromHex("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb4" | ||||
"36012afca590b1a11466e2206")}, | |||||
}}; | }}; | ||||
chainTxData = ChainTxData{0, 0, 0}; | chainTxData = ChainTxData{0, 0, 0}; | ||||
base58Prefixes[PUBKEY_ADDRESS] = std::vector<uint8_t>(1, 111); | base58Prefixes[PUBKEY_ADDRESS] = std::vector<uint8_t>(1, 111); | ||||
base58Prefixes[SCRIPT_ADDRESS] = std::vector<uint8_t>(1, 196); | base58Prefixes[SCRIPT_ADDRESS] = std::vector<uint8_t>(1, 196); | ||||
base58Prefixes[SECRET_KEY] = std::vector<uint8_t>(1, 239); | base58Prefixes[SECRET_KEY] = std::vector<uint8_t>(1, 239); | ||||
base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF}; | base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF}; | ||||
base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94}; | base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94}; | ||||
Show All 32 Lines |