CChainParams

Chain parameters describing a particular Bitcoin network.

Synopsis

Declared in <kernel/chainparams.h>

class CChainParams;

Types

NameDescription
DeploymentOptions Overrides for consensus deployment activation on a custom chain.
MainNetOptions Options for creating a mainnet CChainParams.
RegTestOptions RegTestOptions holds configurations for creating a regtest CChainParams.
SigNetOptions SigNetOptions holds configurations for creating a signet CChainParams.
TestNetOptions Options for creating a testnet CChainParams.
VersionBitsParameters VersionBitsParameters holds activation parameters

Enums

NameDescription
Base58Type Index into the table of Base58 version prefixes for each address type.

Member Functions

NameDescription
AssumedBlockchainSize Minimum free space (in GB) needed for the data directory.
AssumedChainStateSize Minimum free space (in GB) needed for the data directory when pruned; does not include the prune target.
AssumeutxoForBlockhash Looks up the assumeutxo snapshot data for a given base block hash.
AssumeutxoForHeight Looks up the assumeutxo snapshot data for a given block height.
Base58Prefix Returns the Base58 version prefix bytes for a given address type.
Bech32HRP Returns the human-readable part used for Bech32 addresses.
DNSSeeds Returns the list of hostnames to look up for DNS seeds.
DefaultConsistencyChecks Default value for the -checkmempool and -checkblockindex arguments.
FixedSeeds Returns the built-in list of fixed peer seeds.
GenesisBlock Returns the genesis block of this chain.
GetAvailableSnapshotHeights Returns the heights for which an assumeutxo snapshot is available.
GetChainType Returns the chain type of this instance.
GetChainTypeString Returns the chain type as a human-readable string.
GetConsensus Returns the consensus parameters for this chain.
GetDefaultPort Returns the default P2P port for this chain.
HeadersSync Returns the headers-sync memory usage parameters.
IsMockableChain Reports whether this chain allows time to be mocked.
IsTestChain Reports whether this chain is exclusively used for testing.
MessageStart Returns the network magic bytes that prefix every P2P message.
MineBlocksOnDemand Reports whether blocks can be mined on demand without retargeting.
PruneAfterHeight Returns the block height below which pruning is not attempted.
TxData Returns the transaction statistics used to estimate sync progress.

Static Member Functions

NameDescription
Main Main overloads
RegTest RegTest overloads
SigNet SigNet overloads
TestNet TestNet overloads
TestNet4 TestNet4 overloads

Protected Member Functions

NameDescription
CChainParams [constructor]Default-constructs an empty set of chain parameters.
ApplyDeploymentOptions Applies deployment activation overrides to the consensus parameters.

Protected Data Members

NameDescription
base58Prefixes Base58 version prefixes indexed by Base58Type.
bech32_hrp Human-readable part used for Bech32 addresses.
chainTxData Transaction statistics used to estimate sync progress.
consensus Consensus rule parameters for this chain.
fDefaultConsistencyChecks Whether consistency checks run by default.
genesis Genesis block of this chain.
m_assumed_blockchain_size Assumed full blockchain size, in gigabytes.
m_assumed_chain_state_size Assumed pruned chain-state size, in gigabytes.
m_assumeutxo_data Recognized assumeutxo snapshots for this chain.
m_chain_type Chain type of this instance.
m_headers_sync_params Headers-sync memory usage parameters.
m_is_mockable_chain Whether the block time can be mocked.
nDefaultPort Default P2P port for this chain.
nPruneAfterHeight Block height below which pruning is not attempted.
pchMessageStart Network magic bytes prefixing every P2P message.
vFixedSeeds Built-in list of fixed peer seeds.
vSeeds Hostnames looked up for DNS seeds.

Non-Member Functions

NameDescription
CreateChainParamsCreates and returns a std::unique_ptr<CChainParams> of the chosen chain.
ParamsReturn the currently selected parameters. This won't change after app startup, except for unit tests.