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");
169 uint256S(
"000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1"
172 uint256S(
"4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b"
182 vSeeds.emplace_back(
"seed.bitcoinabc.org");
184 vSeeds.emplace_back(
"seeder.fabien.cash");
186 vSeeds.emplace_back(
"seeder.status.cash");
237 "0000000023b3a96d3484e5abb3755c413e7d41500f8e2a5c3f0dd01299cd8ef8");
245 "00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
316 uint256S(
"000000000933ea01ad0ee984209779baaec3ced90fa3f408719526"
319 uint256S(
"4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b"
326 vSeeds.emplace_back(
"testnet-seed.bitcoinabc.org");
328 vSeeds.emplace_back(
"testnet-seeder.fabien.cash");
330 vSeeds.emplace_back(
"testnet-seeder.status.cash");
381 "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
447 uint256S(
"0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b"
450 uint256S(
"0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab212"
469 "d136766430304735a73372fe36213")},
475 "044d2466661a3fe8a8b91ba601849")},
501 return std::make_unique<CMainParams>();
505 return std::make_unique<CTestNetParams>();
509 return std::make_unique<CRegTestParams>();
512 throw std::runtime_error(
513 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.
BlockHash defaultAssumeValid
int magneticAnomalyHeight
Block height at which the magnetic anomaly activation becomes active.
int BIP65Height
Block height at which BIP65 becomes active.
bool enableStakingRewards
Enable or disable the staking rewards by default.
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.
int leeKuanYewActivationTime
Unix time used for MTP activation of 15 May 2024 12:00:00 UTC upgrade.
int BIP16Height
Block height at which BIP16 becomes active.
int wellingtonHeight
Block height at which the wellington activation becomes active.
int phononHeight
Block height at which the phonon activation becomes active.
int BIP34Height
Block height and hash at which BIP34 becomes active.
int nSubsidyHalvingInterval
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.
int cowperthwaiteHeight
Block height at which the Cowperthwaite activation becomes active.
int64_t nPowTargetSpacing
bool fPowAllowMinDifficultyBlocks
uint256 uint256S(const char *str)
uint256 from const char *.