6 #ifndef BITCOIN_KERNEL_CHAINPARAMS_H
7 #define BITCOIN_KERNEL_CHAINPARAMS_H
23 #include <unordered_map>
34 return final_checkpoint->first ;
140 std::optional<std::vector<std::string>>
seeds{};
161 static std::unique_ptr<const CChainParams>
RegTest(
const RegTestOptions& options);
162 static std::unique_ptr<const CChainParams>
SigNet(
const SigNetOptions& options);
163 static std::unique_ptr<const CChainParams>
Main();
164 static std::unique_ptr<const CChainParams>
TestNet();
std::string ChainTypeToString(ChainType chain)
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
std::string GetChainTypeString() const
Return the chain type string.
uint64_t m_assumed_chain_state_size
const std::vector< unsigned char > & Base58Prefix(Base58Type type) const
static std::unique_ptr< const CChainParams > Main()
bool DefaultConsistencyChecks() const
Default value for -checkmempool and -checkblockindex argument.
static std::unique_ptr< const CChainParams > RegTest(const RegTestOptions &options)
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< std::string > & DNSSeeds() const
Return the list of hostnames to look up for DNS seeds.
const ChainTxData & TxData() const
const CMessageHeader::MessageStartChars & MessageStart() const
const std::string & Bech32HRP() const
uint64_t m_assumed_blockchain_size
const CCheckpointData & Checkpoints() const
std::vector< uint8_t > vFixedSeeds
bool IsMockableChain() const
If this chain allows time to be mocked.
bool fDefaultConsistencyChecks
static std::unique_ptr< const CChainParams > TestNet()
const MapAssumeutxo & Assumeutxo() const
Get allowed assumeutxo configuration.
std::vector< unsigned char > base58Prefixes[MAX_BASE58_TYPES]
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
const std::vector< uint8_t > & FixedSeeds() const
const Consensus::Params & GetConsensus() const
uint16_t GetDefaultPort() const
uint64_t AssumedBlockchainSize() const
Minimum free space (in GB) needed for data directory.
std::vector< std::string > vSeeds
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
ChainType GetChainType() const
Return the chain type.
CMessageHeader::MessageStartChars pchMessageStart
const CBlock & GenesisBlock() const
static std::unique_ptr< const CChainParams > SigNet(const SigNetOptions &options)
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.
enum Network GetNetwork() const
std::map< int, const AssumeutxoData > MapAssumeutxo
std::map< int, uint256 > MapCheckpoints
static constexpr uint16_t I2P_SAM31_PORT
SAM 3.1 and earlier do not support specifying ports and force the port to 0.
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)
RegTestOptions holds configurations for creating a regtest CChainParams.
std::unordered_map< Consensus::DeploymentPos, VersionBitsParameters > version_bits_parameters
std::unordered_map< Consensus::BuriedDeployment, int > activation_heights
SigNetOptions holds configurations for creating a signet CChainParams.
std::optional< std::vector< uint8_t > > challenge
std::optional< std::vector< std::string > > seeds
VersionBitsParameters holds activation parameters.
int min_activation_height
MapCheckpoints mapCheckpoints
Holds various statistics on transactions within a chain.
double dTxRate
estimated number of transactions per second after that timestamp
int64_t nTime
UNIX timestamp of last known number of transactions.
int64_t nTxCount
total number of transactions between genesis and that timestamp
Parameters that influence chain consensus.