6#ifndef BITCOIN_KERNEL_CHAINPARAMS_H
7#define BITCOIN_KERNEL_CHAINPARAMS_H
22#include <unordered_map>
147 static std::unique_ptr<const CChainParams>
148 RegTest(
const ChainOptions &options);
149 static std::unique_ptr<const CChainParams>
150 Main(
const ChainOptions &options);
151 static std::unique_ptr<const CChainParams>
152 TestNet(
const ChainOptions &options);
178 friend const std::vector<std::string>
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
uint64_t m_assumed_chain_state_size
const CBlock & GenesisBlock() const
bool DefaultConsistencyChecks() const
Default value for -checkmempool and -checkblockindex argument.
const CMessageHeader::MessageMagic & NetMagic() const
const CMessageHeader::MessageMagic & DiskMagic() const
const std::vector< SeedSpec6 > & FixedSeeds() const
std::string NetworkIDString() const
Return the BIP70 network string (main, test or regtest)
uint16_t GetDefaultPort(const std::string &addr) const
bool RequireStandard() const
Policy: Filter transactions that do not match well-defined patterns.
MapAssumeutxo m_assumeutxo_data
const std::vector< uint8_t > & Base58Prefix(Base58Type type) const
Return the list of hostnames to look up for DNS seeds.
uint64_t m_assumed_blockchain_size
bool IsMockableChain() const
If this chain allows time to be mocked.
CMessageHeader::MessageMagic netMagic
std::vector< uint8_t > base58Prefixes[MAX_BASE58_TYPES]
bool fDefaultConsistencyChecks
std::vector< SeedSpec6 > vFixedSeeds
const ChainTxData & TxData() const
friend const std::vector< std::string > GetRandomizedDNSSeeds(const CChainParams ¶ms)
Return the list of hostnames to look up for DNS seeds.
const Consensus::Params & GetConsensus() const
bool IsTestChain() const
If this chain is exclusively used for testing.
bool MineBlocksOnDemand() const
Whether it is possible to mine blocks on demand (no retargeting)
Consensus::Params consensus
static std::unique_ptr< const CChainParams > TestNet(const ChainOptions &options)
uint16_t GetDefaultPort() const
static std::unique_ptr< const CChainParams > RegTest(const ChainOptions &options)
const std::string & CashAddrPrefix() const
uint64_t AssumedBlockchainSize() const
Minimum free space (in GB) needed for data directory.
std::string cashaddrPrefix
std::vector< std::string > vSeeds
CMessageHeader::MessageMagic diskMagic
static std::unique_ptr< const CChainParams > Main(const ChainOptions &options)
uint64_t AssumedChainStateSize() const
Minimum free space (in GB) needed for data directory when pruned; Does not include prune target.
uint64_t PruneAfterHeight() const
CCheckpointData checkpointData
const MapAssumeutxo & Assumeutxo() const
Get allowed assumeutxo configuration.
const CCheckpointData & Checkpoints() const
uint64_t nPruneAfterHeight
uint16_t GetDefaultPort(Network net) const
bool SetSpecial(const std::string &addr)
Parse a Tor or I2P address and set this object to it.
std::map< int, const AssumeutxoData > MapAssumeutxo
std::map< int, BlockHash > MapCheckpoints
const CCheckpointData & CheckpointData(const std::string &chain)
static constexpr uint16_t I2P_SAM31_PORT
SAM 3.1 and earlier do not support specifying ports and force the port to 0.
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Holds configuration for use during UTXO snapshot load and validation.
const AssumeutxoHash hash_serialized
The expected hash of the deserialized UTXO set.
const unsigned int nChainTx
Used to populate the nChainTx value, which is used during BlockManager::LoadBlockIndex().
AssumeutxoHash(const uint256 &hash)
MapCheckpoints mapCheckpoints
Holds various statistics on transactions within a chain.
Parameters that influence chain consensus.