[#CChainParams] = CChainParams :mrdocs: Chain parameters describing a particular Bitcoin network. == Synopsis Declared in `<kernel/chainparams.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class CChainParams; ---- == Types [cols="1,4"] |=== | Name| Description | xref:CChainParams/DeploymentOptions.adoc[`DeploymentOptions`] | Overrides for consensus deployment activation on a custom chain. | xref:CChainParams/MainNetOptions.adoc[`MainNetOptions`] | Options for creating a mainnet CChainParams. | xref:CChainParams/RegTestOptions.adoc[`RegTestOptions`] | RegTestOptions holds configurations for creating a regtest CChainParams. | xref:CChainParams/SigNetOptions.adoc[`SigNetOptions`] | SigNetOptions holds configurations for creating a signet CChainParams. | xref:CChainParams/TestNetOptions.adoc[`TestNetOptions`] | Options for creating a testnet CChainParams. | xref:CChainParams/VersionBitsParameters.adoc[`VersionBitsParameters`] | VersionBitsParameters holds activation parameters |=== == Enums [cols="1,4"] |=== | Name| Description | xref:CChainParams/Base58Type.adoc[`Base58Type`] | Index into the table of Base58 version prefixes for each address type. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:CChainParams/AssumedBlockchainSize.adoc[`AssumedBlockchainSize`] | Minimum free space (in GB) needed for the data directory. | xref:CChainParams/AssumedChainStateSize.adoc[`AssumedChainStateSize`] | Minimum free space (in GB) needed for the data directory when pruned; does not include the prune target. | xref:CChainParams/AssumeutxoForBlockhash.adoc[`AssumeutxoForBlockhash`] | Looks up the assumeutxo snapshot data for a given base block hash. | xref:CChainParams/AssumeutxoForHeight.adoc[`AssumeutxoForHeight`] | Looks up the assumeutxo snapshot data for a given block height. | xref:CChainParams/Base58Prefix.adoc[`Base58Prefix`] | Returns the Base58 version prefix bytes for a given address type. | xref:CChainParams/Bech32HRP.adoc[`Bech32HRP`] | Returns the human‐readable part used for Bech32 addresses. | xref:CChainParams/DNSSeeds.adoc[`DNSSeeds`] | Returns the list of hostnames to look up for DNS seeds. | xref:CChainParams/DefaultConsistencyChecks.adoc[`DefaultConsistencyChecks`] | Default value for the ‐checkmempool and ‐checkblockindex arguments. | xref:CChainParams/FixedSeeds.adoc[`FixedSeeds`] | Returns the built‐in list of fixed peer seeds. | xref:CChainParams/GenesisBlock.adoc[`GenesisBlock`] | Returns the genesis block of this chain. | xref:CChainParams/GetAvailableSnapshotHeights.adoc[`GetAvailableSnapshotHeights`] | Returns the heights for which an assumeutxo snapshot is available. | xref:CChainParams/GetChainType.adoc[`GetChainType`] | Returns the chain type of this instance. | xref:CChainParams/GetChainTypeString.adoc[`GetChainTypeString`] | Returns the chain type as a human‐readable string. | xref:CChainParams/GetConsensus.adoc[`GetConsensus`] | Returns the consensus parameters for this chain. | xref:CChainParams/GetDefaultPort.adoc[`GetDefaultPort`] | Returns the default P2P port for this chain. | xref:CChainParams/HeadersSync.adoc[`HeadersSync`] | Returns the headers‐sync memory usage parameters. | xref:CChainParams/IsMockableChain.adoc[`IsMockableChain`] | Reports whether this chain allows time to be mocked. | xref:CChainParams/IsTestChain.adoc[`IsTestChain`] | Reports whether this chain is exclusively used for testing. | xref:CChainParams/MessageStart.adoc[`MessageStart`] | Returns the network magic bytes that prefix every P2P message. | xref:CChainParams/MineBlocksOnDemand.adoc[`MineBlocksOnDemand`] | Reports whether blocks can be mined on demand without retargeting. | xref:CChainParams/PruneAfterHeight.adoc[`PruneAfterHeight`] | Returns the block height below which pruning is not attempted. | xref:CChainParams/TxData.adoc[`TxData`] | Returns the transaction statistics used to estimate sync progress. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:CChainParams/Main-03.adoc[`Main`] | `Main` overloads | xref:CChainParams/RegTest-08.adoc[`RegTest`] | `RegTest` overloads | xref:CChainParams/SigNet-00.adoc[`SigNet`] | `SigNet` overloads | xref:CChainParams/TestNet-04.adoc[`TestNet`] | `TestNet` overloads | xref:CChainParams/TestNet4-00.adoc[`TestNet4`] | `TestNet4` overloads |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:CChainParams/2constructor.adoc[`CChainParams`] [.small]#[constructor]# | Default‐constructs an empty set of chain parameters. | xref:CChainParams/ApplyDeploymentOptions.adoc[`ApplyDeploymentOptions`] | Applies deployment activation overrides to the consensus parameters. |=== == Protected Data Members [cols="1,4"] |=== | Name| Description | xref:CChainParams/base58Prefixes.adoc[`base58Prefixes`] | Base58 version prefixes indexed by Base58Type. | xref:CChainParams/bech32_hrp.adoc[`bech32_hrp`] | Human‐readable part used for Bech32 addresses. | xref:CChainParams/chainTxData.adoc[`chainTxData`] | Transaction statistics used to estimate sync progress. | xref:CChainParams/consensus.adoc[`consensus`] | Consensus rule parameters for this chain. | xref:CChainParams/fDefaultConsistencyChecks.adoc[`fDefaultConsistencyChecks`] | Whether consistency checks run by default. | xref:CChainParams/genesis.adoc[`genesis`] | Genesis block of this chain. | xref:CChainParams/m_assumed_blockchain_size.adoc[`m_assumed_blockchain_size`] | Assumed full blockchain size, in gigabytes. | xref:CChainParams/m_assumed_chain_state_size.adoc[`m_assumed_chain_state_size`] | Assumed pruned chain‐state size, in gigabytes. | xref:CChainParams/m_assumeutxo_data.adoc[`m_assumeutxo_data`] | Recognized assumeutxo snapshots for this chain. | xref:CChainParams/m_chain_type.adoc[`m_chain_type`] | Chain type of this instance. | xref:CChainParams/m_headers_sync_params.adoc[`m_headers_sync_params`] | Headers‐sync memory usage parameters. | xref:CChainParams/m_is_mockable_chain.adoc[`m_is_mockable_chain`] | Whether the block time can be mocked. | xref:CChainParams/nDefaultPort.adoc[`nDefaultPort`] | Default P2P port for this chain. | xref:CChainParams/nPruneAfterHeight.adoc[`nPruneAfterHeight`] | Block height below which pruning is not attempted. | xref:CChainParams/pchMessageStart.adoc[`pchMessageStart`] | Network magic bytes prefixing every P2P message. | xref:CChainParams/vFixedSeeds.adoc[`vFixedSeeds`] | Built‐in list of fixed peer seeds. | xref:CChainParams/vSeeds.adoc[`vSeeds`] | Hostnames looked up for DNS seeds. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:CreateChainParams.adoc[`CreateChainParams`] | Creates and returns a std::unique_ptr<CChainParams> of the chosen chain. | xref:Params.adoc[`Params`] | Return the currently selected parameters. This won't change after app startup, except for unit tests. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#