Bitcoin Core  22.99.0
P2P Digital Currency
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CChainParams Class Reference

CChainParams defines various tweakable parameters of a given instance of the Bitcoin system. More...

#include <chainparams.h>

Inheritance diagram for CChainParams:
[legend]
Collaboration diagram for CChainParams:
[legend]

Public Types

enum  Base58Type {
  PUBKEY_ADDRESS, SCRIPT_ADDRESS, SECRET_KEY, EXT_PUBLIC_KEY,
  EXT_SECRET_KEY, MAX_BASE58_TYPES
}
 

Public Member Functions

const Consensus::ParamsGetConsensus () const
 
const CMessageHeader::MessageStartCharsMessageStart () const
 
uint16_t GetDefaultPort () const
 
uint16_t GetDefaultPort (Network net) const
 
uint16_t GetDefaultPort (const std::string &addr) const
 
const CBlockGenesisBlock () const
 
bool DefaultConsistencyChecks () const
 Default value for -checkmempool and -checkblockindex argument. More...
 
bool RequireStandard () const
 Policy: Filter transactions that do not match well-defined patterns. More...
 
bool IsTestChain () const
 If this chain is exclusively used for testing. More...
 
bool IsMockableChain () const
 If this chain allows time to be mocked. More...
 
uint64_t PruneAfterHeight () const
 
uint64_t AssumedBlockchainSize () const
 Minimum free space (in GB) needed for data directory. More...
 
uint64_t AssumedChainStateSize () const
 Minimum free space (in GB) needed for data directory when pruned; Does not include prune target. More...
 
bool MineBlocksOnDemand () const
 Whether it is possible to mine blocks on demand (no retargeting) More...
 
std::string NetworkIDString () const
 Return the network string. More...
 
const std::vector< std::string > & DNSSeeds () const
 Return the list of hostnames to look up for DNS seeds. More...
 
const std::vector< unsigned char > & Base58Prefix (Base58Type type) const
 
const std::string & Bech32HRP () const
 
const std::vector< uint8_t > & FixedSeeds () const
 
const CCheckpointDataCheckpoints () const
 
const MapAssumeutxoAssumeutxo () const
 Get allowed assumeutxo configuration. More...
 
const ChainTxDataTxData () const
 

Protected Member Functions

 CChainParams ()
 

Protected Attributes

Consensus::Params consensus
 
CMessageHeader::MessageStartChars pchMessageStart
 
uint16_t nDefaultPort
 
uint64_t nPruneAfterHeight
 
uint64_t m_assumed_blockchain_size
 
uint64_t m_assumed_chain_state_size
 
std::vector< std::string > vSeeds
 
std::vector< unsigned char > base58Prefixes [MAX_BASE58_TYPES]
 
std::string bech32_hrp
 
std::string strNetworkID
 
CBlock genesis
 
std::vector< uint8_t > vFixedSeeds
 
bool fDefaultConsistencyChecks
 
bool fRequireStandard
 
bool m_is_test_chain
 
bool m_is_mockable_chain
 
CCheckpointData checkpointData
 
MapAssumeutxo m_assumeutxo_data
 
ChainTxData chainTxData
 

Detailed Description

CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.

Definition at line 69 of file chainparams.h.

Member Enumeration Documentation

◆ Base58Type

Enumerator
PUBKEY_ADDRESS 
SCRIPT_ADDRESS 
SECRET_KEY 
EXT_PUBLIC_KEY 
EXT_SECRET_KEY 
MAX_BASE58_TYPES 

Definition at line 72 of file chainparams.h.

Constructor & Destructor Documentation

◆ CChainParams()

CChainParams::CChainParams ( )
inlineprotected

Definition at line 126 of file chainparams.h.

Member Function Documentation

◆ AssumedBlockchainSize()

uint64_t CChainParams::AssumedBlockchainSize ( ) const
inline

Minimum free space (in GB) needed for data directory.

Definition at line 106 of file chainparams.h.

◆ AssumedChainStateSize()

uint64_t CChainParams::AssumedChainStateSize ( ) const
inline

Minimum free space (in GB) needed for data directory when pruned; Does not include prune target.

Definition at line 108 of file chainparams.h.

◆ Assumeutxo()

const MapAssumeutxo& CChainParams::Assumeutxo ( ) const
inline

Get allowed assumeutxo configuration.

See also
ChainstateManager

Definition at line 122 of file chainparams.h.

Here is the caller graph for this function:

◆ Base58Prefix()

const std::vector<unsigned char>& CChainParams::Base58Prefix ( Base58Type  type) const
inline

Definition at line 115 of file chainparams.h.

Here is the caller graph for this function:

◆ Bech32HRP()

const std::string& CChainParams::Bech32HRP ( ) const
inline

Definition at line 116 of file chainparams.h.

◆ Checkpoints()

const CCheckpointData& CChainParams::Checkpoints ( ) const
inline

Definition at line 118 of file chainparams.h.

◆ DefaultConsistencyChecks()

bool CChainParams::DefaultConsistencyChecks ( ) const
inline

Default value for -checkmempool and -checkblockindex argument.

Definition at line 97 of file chainparams.h.

Here is the caller graph for this function:

◆ DNSSeeds()

const std::vector<std::string>& CChainParams::DNSSeeds ( ) const
inline

Return the list of hostnames to look up for DNS seeds.

Definition at line 114 of file chainparams.h.

Here is the caller graph for this function:

◆ FixedSeeds()

const std::vector<uint8_t>& CChainParams::FixedSeeds ( ) const
inline

Definition at line 117 of file chainparams.h.

◆ GenesisBlock()

const CBlock& CChainParams::GenesisBlock ( ) const
inline

Definition at line 95 of file chainparams.h.

Here is the caller graph for this function:

◆ GetConsensus()

const Consensus::Params& CChainParams::GetConsensus ( ) const
inline

Definition at line 82 of file chainparams.h.

Here is the caller graph for this function:

◆ GetDefaultPort() [1/3]

uint16_t CChainParams::GetDefaultPort ( ) const
inline

Definition at line 84 of file chainparams.h.

Here is the caller graph for this function:

◆ GetDefaultPort() [2/3]

uint16_t CChainParams::GetDefaultPort ( const std::string &  addr) const
inline

Definition at line 89 of file chainparams.h.

Here is the call graph for this function:

◆ GetDefaultPort() [3/3]

uint16_t CChainParams::GetDefaultPort ( Network  net) const
inline

Definition at line 85 of file chainparams.h.

Here is the call graph for this function:

◆ IsMockableChain()

bool CChainParams::IsMockableChain ( ) const
inline

If this chain allows time to be mocked.

Definition at line 103 of file chainparams.h.

Here is the caller graph for this function:

◆ IsTestChain()

bool CChainParams::IsTestChain ( ) const
inline

If this chain is exclusively used for testing.

Definition at line 101 of file chainparams.h.

Here is the caller graph for this function:

◆ MessageStart()

const CMessageHeader::MessageStartChars& CChainParams::MessageStart ( ) const
inline

Definition at line 83 of file chainparams.h.

Here is the caller graph for this function:

◆ MineBlocksOnDemand()

bool CChainParams::MineBlocksOnDemand ( ) const
inline

Whether it is possible to mine blocks on demand (no retargeting)

Definition at line 110 of file chainparams.h.

Here is the caller graph for this function:

◆ NetworkIDString()

std::string CChainParams::NetworkIDString ( ) const
inline

Return the network string.

Definition at line 112 of file chainparams.h.

Here is the caller graph for this function:

◆ PruneAfterHeight()

uint64_t CChainParams::PruneAfterHeight ( ) const
inline

Definition at line 104 of file chainparams.h.

Here is the caller graph for this function:

◆ RequireStandard()

bool CChainParams::RequireStandard ( ) const
inline

Policy: Filter transactions that do not match well-defined patterns.

Definition at line 99 of file chainparams.h.

Here is the caller graph for this function:

◆ TxData()

const ChainTxData& CChainParams::TxData ( ) const
inline

Definition at line 124 of file chainparams.h.

Here is the caller graph for this function:

Member Data Documentation

◆ base58Prefixes

std::vector<unsigned char> CChainParams::base58Prefixes[MAX_BASE58_TYPES]
protected

Definition at line 135 of file chainparams.h.

◆ bech32_hrp

std::string CChainParams::bech32_hrp
protected

Definition at line 136 of file chainparams.h.

◆ chainTxData

ChainTxData CChainParams::chainTxData
protected

Definition at line 146 of file chainparams.h.

◆ checkpointData

CCheckpointData CChainParams::checkpointData
protected

Definition at line 144 of file chainparams.h.

◆ consensus

Consensus::Params CChainParams::consensus
protected

Definition at line 128 of file chainparams.h.

◆ fDefaultConsistencyChecks

bool CChainParams::fDefaultConsistencyChecks
protected

Definition at line 140 of file chainparams.h.

◆ fRequireStandard

bool CChainParams::fRequireStandard
protected

Definition at line 141 of file chainparams.h.

◆ genesis

CBlock CChainParams::genesis
protected

Definition at line 138 of file chainparams.h.

◆ m_assumed_blockchain_size

uint64_t CChainParams::m_assumed_blockchain_size
protected

Definition at line 132 of file chainparams.h.

◆ m_assumed_chain_state_size

uint64_t CChainParams::m_assumed_chain_state_size
protected

Definition at line 133 of file chainparams.h.

◆ m_assumeutxo_data

MapAssumeutxo CChainParams::m_assumeutxo_data
protected

Definition at line 145 of file chainparams.h.

◆ m_is_mockable_chain

bool CChainParams::m_is_mockable_chain
protected

Definition at line 143 of file chainparams.h.

◆ m_is_test_chain

bool CChainParams::m_is_test_chain
protected

Definition at line 142 of file chainparams.h.

◆ nDefaultPort

uint16_t CChainParams::nDefaultPort
protected

Definition at line 130 of file chainparams.h.

◆ nPruneAfterHeight

uint64_t CChainParams::nPruneAfterHeight
protected

Definition at line 131 of file chainparams.h.

◆ pchMessageStart

CMessageHeader::MessageStartChars CChainParams::pchMessageStart
protected

Definition at line 129 of file chainparams.h.

◆ strNetworkID

std::string CChainParams::strNetworkID
protected

Definition at line 137 of file chainparams.h.

◆ vFixedSeeds

std::vector<uint8_t> CChainParams::vFixedSeeds
protected

Definition at line 139 of file chainparams.h.

◆ vSeeds

std::vector<std::string> CChainParams::vSeeds
protected

Definition at line 134 of file chainparams.h.


The documentation for this class was generated from the following file: