19 const CScript &genesisOutputScript,
20 uint32_t nTime, uint32_t nNonce,
21 uint32_t nBits, int32_t nVersion,
22 const Amount genesisReward) {
27 txNew.
vin[0].scriptSig =
29 << std::vector<uint8_t>((
const uint8_t *)pszTimestamp,
30 (
const uint8_t *)pszTimestamp +
31 strlen(pszTimestamp));
32 txNew.
vout[0].nValue = genesisReward;
33 txNew.
vout[0].scriptPubKey = genesisOutputScript;
36 genesis.
nTime = nTime;
37 genesis.
nBits = nBits;
60 int32_t nVersion,
const Amount genesisReward) {
61 const char *pszTimestamp =
62 "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
63 const CScript genesisOutputScript =
64 CScript() <<
ParseHex(
"04678afdb0fe5548271967f1a67130b7105cd6a828e03909"
65 "a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112"
66 "de5c384df7ba0b8d578a4c702b6bf11d5f")
69 nBits, nVersion, genesisReward);
85 "000000000000024b89b42a942fe0d9fea3bb44ab7bd1b19115dd6a759c0808b8");
93 "00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
108 .nActivationThreshold = 1916,
110 .nStartTime = 1199145601,
112 .nTimeout = 1230767999,
178 uint256S(
"000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1"
181 uint256S(
"4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b"
191 vSeeds.emplace_back(
"seed.bitcoinabc.org");
193 vSeeds.emplace_back(
"seed.deadalnix.me");
195 vSeeds.emplace_back(
"seeder.fabien.cash");
196 vSeeds.emplace_back(
"seeder2.fabien.cash");
198 vSeeds.emplace_back(
"seeder.status.cash");
249 "0000000023b3a96d3484e5abb3755c413e7d41500f8e2a5c3f0dd01299cd8ef8");
257 "00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
272 .nActivationThreshold = 1512,
274 .nStartTime = 1199145601,
276 .nTimeout = 1230767999,
337 uint256S(
"000000000933ea01ad0ee984209779baaec3ced90fa3f408719526"
340 uint256S(
"4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b"
347 vSeeds.emplace_back(
"testnet-seed.bitcoinabc.org");
349 vSeeds.emplace_back(
"testnet-seed.deadalnix.me");
351 vSeeds.emplace_back(
"testnet-seeder.fabien.cash");
353 vSeeds.emplace_back(
"testnet-seeder.status.cash");
404 "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
419 .nActivationThreshold = 108,
475 uint256S(
"0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b"
478 uint256S(
"0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab212"
497 "39334050eb557a6f005d7d8184ea9")},
503 "4e64f07aa5bfec96e055ac2a9a87a")},
529 return std::make_unique<CMainParams>();
533 return std::make_unique<CTestNetParams>();
537 return std::make_unique<CRegTestParams>();
540 throw std::runtime_error(
541 strprintf(
"%s: Unknown chain %s.", __func__, chain));
static constexpr Amount COIN
void SelectParams(const std::string &network)
Sets the params returned by Params() to those for the given BIP70 chain name.
static std::unique_ptr< CChainParams > globalChainParams
const CChainParams & Params()
Return the currently selected parameters.
std::unique_ptr< CChainParams > CreateChainParams(const std::string &chain)
Creates and returns a std::unique_ptr<CChainParams> of the chosen chain.
static CBlock CreateGenesisBlock(const char *pszTimestamp, const CScript &genesisOutputScript, uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const Amount genesisReward)
std::map< int, const AssumeutxoData > MapAssumeutxo
const CCheckpointData & CheckpointData(const std::string &chain)
void SelectBaseParams(const std::string &chain)
Sets the params returned by Params() to those for the given network.
static SeedSpec6 pnSeed6_main[]
List of fixed seed nodes for the bitcoin network @generated by contrib/seeds/generate-seeds....
static SeedSpec6 pnSeed6_test[]
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
static const std::string REGTEST
static const std::string TESTNET
static const std::string MAIN
BIP70 chain name strings (main, test or regtest)
std::vector< CTransactionRef > vtx
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
uint64_t m_assumed_chain_state_size
MapAssumeutxo m_assumeutxo_data
uint64_t m_assumed_blockchain_size
CMessageHeader::MessageMagic netMagic
std::vector< uint8_t > base58Prefixes[MAX_BASE58_TYPES]
bool fDefaultConsistencyChecks
std::vector< SeedSpec6 > vFixedSeeds
Consensus::Params consensus
std::string cashaddrPrefix
std::vector< std::string > vSeeds
CMessageHeader::MessageMagic diskMagic
CCheckpointData checkpointData
uint64_t nPruneAfterHeight
A mutable version of CTransaction.
std::vector< CTxOut > vout
Serialized script, used inside transaction inputs and outputs.
constexpr bool DEFAULT_ECASH
uint256 BlockMerkleRoot(const CBlock &block, bool *mutated)
Compute the Merkle root of the transactions in a block.
const uint64_t MAINNET_ASSUMED_CHAINSTATE_SIZE
const uint64_t TESTNET_ASSUMED_CHAINSTATE_SIZE
const uint64_t MAINNET_ASSUMED_BLOCKCHAIN_SIZE
const uint64_t TESTNET_ASSUMED_BLOCKCHAIN_SIZE
const BlockHash MAINNET_DEFAULT_ASSUME_VALID
const uint256 TESTNET_MINIMUM_CHAIN_WORK
const uint256 MAINNET_MINIMUM_CHAIN_WORK
const BlockHash TESTNET_DEFAULT_ASSUME_VALID
static CTransactionRef MakeTransactionRef()
std::vector< uint8_t > ParseHex(const char *psz)
A BlockHash is a unqiue identifier for a block.
static BlockHash fromHex(const std::string &str)
Holds various statistics on transactions within a chain.
int bit
Bit position to select the particular bit in nVersion.
BlockHash defaultAssumeValid
int magneticAnomalyHeight
Block height at which the magnetic anomaly activation becomes active.
int BIP65Height
Block height at which BIP65 becomes active.
int CSVHeight
Block height at which CSV (BIP68, BIP112 and BIP113) becomes active.
int gravitonHeight
Block height at which the graviton activation becomes active.
int axionHeight
Block height at which the axion activation becomes active.
uint32_t nMinerConfirmationWindow
int wellingtonActivationTime
Unix time used for MTP activation of 15 May 2023 12:00:00 UTC upgrade.
int gluonHeight
Block height at which the gluon activation becomes active.
int BIP16Height
Block height at which BIP16 becomes active.
int phononHeight
Block height at which the phonon activation becomes active.
int jeffersonActivationTime
Unix time used for MTP activation of 15 Nov 2022 12:00:00 UTC upgrade.
int BIP34Height
Block height and hash at which BIP34 becomes active.
int nSubsidyHalvingInterval
BIP9Deployment vDeployments[MAX_VERSION_BITS_DEPLOYMENTS]
uint256 nMinimumChainWork
int daaHeight
Block height at which the new DAA becomes active.
int64_t nPowTargetTimespan
BlockHash hashGenesisBlock
int BIP66Height
Block height at which BIP66 becomes active.
uint256 powLimit
Proof of work parameters.
int uahfHeight
Block height at which UAHF kicks in.
bool enableMinerFund
Enable or disable the miner fund by default.
int64_t nPowTargetSpacing
bool fPowAllowMinDifficultyBlocks
uint256 uint256S(const char *str)
uint256 from const char *.