Changeset View
Changeset View
Standalone View
Standalone View
src/chainparams.cpp
// Copyright (c) 2010 Satoshi Nakamoto | // Copyright (c) 2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "chainparams.h" | #include "chainparams.h" | ||||
#include "consensus/merkle.h" | #include "consensus/merkle.h" | ||||
#include "tinyformat.h" | #include "tinyformat.h" | ||||
#include "util.h" | #include "util.h" | ||||
#include "utilstrencodings.h" | #include "utilstrencodings.h" | ||||
#include <cassert> | #include <cassert> | ||||
#include <boost/assign/list_of.hpp> | |||||
#include "chainparamsseeds.h" | #include "chainparamsseeds.h" | ||||
// Far into the future. | // Far into the future. | ||||
static const std::string ANTI_REPLAY_COMMITMENT = | static const std::string ANTI_REPLAY_COMMITMENT = | ||||
"Bitcoin: A Peer-to-Peer Electronic Cash System"; | "Bitcoin: A Peer-to-Peer Electronic Cash System"; | ||||
static std::vector<uint8_t> GetAntiReplayCommitment() { | static std::vector<uint8_t> GetAntiReplayCommitment() { | ||||
return std::vector<uint8_t>(std::begin(ANTI_REPLAY_COMMITMENT), | return std::vector<uint8_t>(std::begin(ANTI_REPLAY_COMMITMENT), | ||||
▲ Show 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | CMainParams() { | ||||
CDNSSeedData("deadalnix.me", "seed.deadalnix.me", true)); | CDNSSeedData("deadalnix.me", "seed.deadalnix.me", true)); | ||||
// criptolayer.net | // criptolayer.net | ||||
vSeeds.push_back( | vSeeds.push_back( | ||||
CDNSSeedData("criptolayer.net", "seeder.criptolayer.net", true)); | CDNSSeedData("criptolayer.net", "seeder.criptolayer.net", true)); | ||||
base58Prefixes[PUBKEY_ADDRESS] = std::vector<uint8_t>(1, 0); | base58Prefixes[PUBKEY_ADDRESS] = std::vector<uint8_t>(1, 0); | ||||
base58Prefixes[SCRIPT_ADDRESS] = std::vector<uint8_t>(1, 5); | base58Prefixes[SCRIPT_ADDRESS] = std::vector<uint8_t>(1, 5); | ||||
base58Prefixes[SECRET_KEY] = std::vector<uint8_t>(1, 128); | base58Prefixes[SECRET_KEY] = std::vector<uint8_t>(1, 128); | ||||
base58Prefixes[EXT_PUBLIC_KEY] = | base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xB2, 0x1E}; | ||||
boost::assign::list_of(0x04)(0x88)(0xB2)(0x1E) | base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xAD, 0xE4}; | ||||
.convert_to_container<std::vector<uint8_t>>(); | |||||
base58Prefixes[EXT_SECRET_KEY] = | |||||
boost::assign::list_of(0x04)(0x88)(0xAD)(0xE4) | |||||
.convert_to_container<std::vector<uint8_t>>(); | |||||
vFixedSeeds = std::vector<SeedSpec6>( | vFixedSeeds = std::vector<SeedSpec6>( | ||||
pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main)); | pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main)); | ||||
fMiningRequiresPeers = true; | fMiningRequiresPeers = true; | ||||
fDefaultConsistencyChecks = false; | fDefaultConsistencyChecks = false; | ||||
fRequireStandard = true; | fRequireStandard = true; | ||||
fMineBlocksOnDemand = false; | fMineBlocksOnDemand = false; | ||||
checkpointData = (CCheckpointData){boost::assign::map_list_of( | checkpointData = { | ||||
11111, uint256S("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee925" | .mapCheckpoints = { | ||||
"59f542fdb26e7c1d"))( | {11111, uint256S("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2" | ||||
33333, uint256S("0x000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce" | "ee92559f542fdb26e7c1d")}, | ||||
"69f00d7ddfb5d0a6"))( | {33333, uint256S("0x000000002dd5588a74784eaa7ab0507a18ad16a236e" | ||||
74000, uint256S("0x0000000000573993a3c9e41ce34471c079dcf5f52a0e824a" | "7b1ce69f00d7ddfb5d0a6")}, | ||||
"81e7f953b8661a20"))( | {74000, uint256S("0x0000000000573993a3c9e41ce34471c079dcf5f52a0" | ||||
105000, uint256S("0x00000000000291ce28027faea320c8d2b054b2e0fe44a77" | "e824a81e7f953b8661a20")}, | ||||
"3f3eefb151d6bdc97"))( | {105000, uint256S("0x00000000000291ce28027faea320c8d2b054b2e0fe" | ||||
134444, uint256S("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814" | "44a773f3eefb151d6bdc97")}, | ||||
"c91184a0d42d2b0fe"))( | {134444, uint256S("0x00000000000005b12ffd4cd315cd34ffd4a594f430" | ||||
168000, uint256S("0x000000000000099e61ea72015e79632f216fe6cb33d7899" | "ac814c91184a0d42d2b0fe")}, | ||||
"acb35b75c8303b763"))( | {168000, uint256S("0x000000000000099e61ea72015e79632f216fe6cb33" | ||||
193000, uint256S("0x000000000000059f452a5f7340de6682a977387c17010ff" | "d7899acb35b75c8303b763")}, | ||||
"6e6c3bd83ca8b1317"))( | {193000, uint256S("0x000000000000059f452a5f7340de6682a977387c17" | ||||
210000, uint256S("0x000000000000048b95347e83192f69cf0366076336c639f" | "010ff6e6c3bd83ca8b1317")}, | ||||
"9b7228e9ba171342e"))( | {210000, uint256S("0x000000000000048b95347e83192f69cf0366076336" | ||||
216116, uint256S("0x00000000000001b4f4b433e81ee46494af945cf96014816" | "c639f9b7228e9ba171342e")}, | ||||
"a4e2370f11b23df4e"))( | {216116, uint256S("0x00000000000001b4f4b433e81ee46494af945cf960" | ||||
225430, uint256S("0x00000000000001c108384350f74090433e7fcf79a606b8e" | "14816a4e2370f11b23df4e")}, | ||||
"797f065b130575932"))( | {225430, uint256S("0x00000000000001c108384350f74090433e7fcf79a6" | ||||
250000, uint256S("0x000000000000003887df1f29024b06fc2200b55f8af8f35" | "06b8e797f065b130575932")}, | ||||
"453d7be294df2d214"))( | {250000, uint256S("0x000000000000003887df1f29024b06fc2200b55f8a" | ||||
279000, uint256S("0x0000000000000001ae8c72a0b0c301f67e3afca10e819ef" | "f8f35453d7be294df2d214")}, | ||||
"a9041e458e9bd7e40"))( | {279000, uint256S("0x0000000000000001ae8c72a0b0c301f67e3afca10e" | ||||
295000, uint256S("0x00000000000000004d9b4ef50f0f9d686fd69db2e03af35" | "819efa9041e458e9bd7e40")}, | ||||
"a100370c64632a983"))( | {295000, uint256S("0x00000000000000004d9b4ef50f0f9d686fd69db2e0" | ||||
478641, uint256S("0x0000000000000000027c1fea6fe49acb16d46c82dd2f2a8" | "3af35a100370c64632a983")}, | ||||
"0b22ecc9cdb3ababe"))}; | {478641, uint256S("0x0000000000000000027c1fea6fe49acb16d46c82dd" | ||||
"2f2a80b22ecc9cdb3ababe")}}}; | |||||
// Data as of block | // Data as of block | ||||
// 00000000000000000166d612d5595e2b1cd88d71d695fc580af64d8da8658c23 | // 00000000000000000166d612d5595e2b1cd88d71d695fc580af64d8da8658c23 | ||||
// (height 446482). | // (height 446482). | ||||
chainTxData = ChainTxData{ | chainTxData = ChainTxData{ | ||||
// UNIX timestamp of last known number of transactions. | // UNIX timestamp of last known number of transactions. | ||||
1483472411, | 1483472411, | ||||
// Total number of transactions between genesis and that timestamp | // Total number of transactions between genesis and that timestamp | ||||
▲ Show 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | CTestNetParams() { | ||||
CDNSSeedData("deadalnix.me", "testnet-seed.deadalnix.me", true)); | CDNSSeedData("deadalnix.me", "testnet-seed.deadalnix.me", true)); | ||||
// criptolayer.net | // criptolayer.net | ||||
vSeeds.push_back(CDNSSeedData("criptolayer.net", | vSeeds.push_back(CDNSSeedData("criptolayer.net", | ||||
"testnet-seeder.criptolayer.net", true)); | "testnet-seeder.criptolayer.net", true)); | ||||
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] = | base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF}; | ||||
boost::assign::list_of(0x04)(0x35)(0x87)(0xCF) | base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94}; | ||||
.convert_to_container<std::vector<uint8_t>>(); | |||||
base58Prefixes[EXT_SECRET_KEY] = | |||||
boost::assign::list_of(0x04)(0x35)(0x83)(0x94) | |||||
.convert_to_container<std::vector<uint8_t>>(); | |||||
vFixedSeeds = std::vector<SeedSpec6>( | vFixedSeeds = std::vector<SeedSpec6>( | ||||
pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test)); | pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test)); | ||||
fMiningRequiresPeers = true; | fMiningRequiresPeers = true; | ||||
fDefaultConsistencyChecks = false; | fDefaultConsistencyChecks = false; | ||||
fRequireStandard = false; | fRequireStandard = false; | ||||
fMineBlocksOnDemand = false; | fMineBlocksOnDemand = false; | ||||
checkpointData = (CCheckpointData){ | checkpointData = { | ||||
boost::assign::map_list_of( | .mapCheckpoints = { | ||||
546, uint256S("000000002a936ca763904c3c35fce2f3556c559c0214345d" | {546, uint256S("000000002a936ca763904c3c35fce2f3556c559c0214345" | ||||
"31b1bcebf76acb70")), | "d31b1bcebf76acb70")}, | ||||
}; | }}; | ||||
// Data as of block | // Data as of block | ||||
// 00000000c2872f8f8a8935c8e3c5862be9038c97d4de2cf37ed496991166928a | // 00000000c2872f8f8a8935c8e3c5862be9038c97d4de2cf37ed496991166928a | ||||
// (height 1063660) | // (height 1063660) | ||||
chainTxData = ChainTxData{1483546230, 12834668, 0.15}; | chainTxData = ChainTxData{1483546230, 12834668, 0.15}; | ||||
} | } | ||||
}; | }; | ||||
static CTestNetParams testNetParams; | static CTestNetParams testNetParams; | ||||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | CRegTestParams() { | ||||
//!< Regtest mode doesn't have any DNS seeds. | //!< Regtest mode doesn't have any DNS seeds. | ||||
vSeeds.clear(); | vSeeds.clear(); | ||||
fMiningRequiresPeers = false; | fMiningRequiresPeers = false; | ||||
fDefaultConsistencyChecks = true; | fDefaultConsistencyChecks = true; | ||||
fRequireStandard = false; | fRequireStandard = false; | ||||
fMineBlocksOnDemand = true; | fMineBlocksOnDemand = true; | ||||
checkpointData = (CCheckpointData){boost::assign::map_list_of( | checkpointData = {.mapCheckpoints = { | ||||
0, uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a" | {0, uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5" | ||||
"11466e2206"))}; | "beb436012afca590b1a11466e2206")}, | ||||
}}; | |||||
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] = | base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF}; | ||||
boost::assign::list_of(0x04)(0x35)(0x87)(0xCF) | base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94}; | ||||
.convert_to_container<std::vector<uint8_t>>(); | |||||
base58Prefixes[EXT_SECRET_KEY] = | |||||
boost::assign::list_of(0x04)(0x35)(0x83)(0x94) | |||||
.convert_to_container<std::vector<uint8_t>>(); | |||||
} | } | ||||
void UpdateBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime, | void UpdateBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime, | ||||
int64_t nTimeout) { | int64_t nTimeout) { | ||||
consensus.vDeployments[d].nStartTime = nStartTime; | consensus.vDeployments[d].nStartTime = nStartTime; | ||||
consensus.vDeployments[d].nTimeout = nTimeout; | consensus.vDeployments[d].nTimeout = nTimeout; | ||||
} | } | ||||
}; | }; | ||||
Show All 31 Lines |