ChainType

Identifies which Bitcoin chain a node operates on.

Synopsis

Declared in <util/chaintype.h>

enum class ChainType : int;

Members

NameDescription
MAIN The main Bitcoin network (mainnet).
TESTNET The version 3 public test network (testnet3).
SIGNET A signet network, where blocks require a signature.
REGTEST A private regression test network with on-demand block creation.
TESTNET4 The version 4 public test network (testnet4).

Non-Member Functions

NameDescription
ChainTypeFromStringParse a chain type from its canonical string name.
ChainTypeToStringConvert a chain type to its canonical string name.
CreateBaseChainParamsCreates and returns a std::unique_ptr<CBaseChainParams> of the chosen chain.
GetNetworkForMagicDetermines which chain a set of network magic bytes belongs to.
SelectBaseParamsSets the params returned by Params() to those for the given chain.
SelectParamsSets the params returned by Params() to those for the given chain type.