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 | ||||
// Copyright (c) 2017-2020 The Bitcoin developers | // Copyright (c) 2017-2020 The Bitcoin 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 <chainparamsconstants.h> | #include <chainparamsconstants.h> | ||||
#include <chainparamsseeds.h> | #include <chainparamsseeds.h> | ||||
#include <consensus/merkle.h> | #include <consensus/merkle.h> | ||||
#include <network.h> | #include <network.h> | ||||
#include <random.h> | |||||
#include <tinyformat.h> | #include <tinyformat.h> | ||||
#include <util/strencodings.h> | #include <util/strencodings.h> | ||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <cassert> | #include <cassert> | ||||
static CBlock CreateGenesisBlock(const char *pszTimestamp, | static CBlock CreateGenesisBlock(const char *pszTimestamp, | ||||
const CScript &genesisOutputScript, | const CScript &genesisOutputScript, | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | const CScript genesisOutputScript = | ||||
CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909" | CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909" | ||||
"a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112" | "a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112" | ||||
"de5c384df7ba0b8d578a4c702b6bf11d5f") | "de5c384df7ba0b8d578a4c702b6bf11d5f") | ||||
<< OP_CHECKSIG; | << OP_CHECKSIG; | ||||
return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, | return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, | ||||
nBits, nVersion, genesisReward); | nBits, nVersion, genesisReward); | ||||
} | } | ||||
const std::vector<std::string> CChainParams::GetRandomizedDNSSeeds() const { | |||||
FastRandomContext rng; | |||||
std::vector<std::string> seeds; | |||||
if (gArgs.IsArgSet("-overridednsseed")) { | |||||
seeds = {gArgs.GetArg("-overridednsseed", "")}; | |||||
} else { | |||||
seeds = vSeeds; | |||||
} | |||||
Shuffle(seeds.begin(), seeds.end(), rng); | |||||
return seeds; | |||||
} | |||||
/** | /** | ||||
* Main network | * Main network | ||||
*/ | */ | ||||
class CMainParams : public CChainParams { | class CMainParams : public CChainParams { | ||||
public: | public: | ||||
CMainParams() { | CMainParams() { | ||||
strNetworkID = CBaseChainParams::MAIN; | strNetworkID = CBaseChainParams::MAIN; | ||||
consensus.nSubsidyHalvingInterval = 210000; | consensus.nSubsidyHalvingInterval = 210000; | ||||
▲ Show 20 Lines • Show All 426 Lines • Show Last 20 Lines |