Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

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

#include <chainparams.h>

+ Inheritance diagram for CChainParams:
+ Collaboration diagram for CChainParams:

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
 
int GetDefaultPort () const
 
const CBlockGenesisBlock () const
 
const CBlockDevNetGenesisBlock () 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 RequireRoutableExternalIP () const
 Require addresses specified with "-externalip" parameter to be routable. More...
 
uint64_t PruneAfterHeight () const
 
bool MineBlocksOnDemand () const
 Make miner stop after a block is found. More...
 
bool AllowMultipleAddressesFromGroup () const
 Allow multiple addresses to be selected from the same network group (e.g. More...
 
bool AllowMultiplePorts () const
 Allow nodes with the same address and multiple ports. More...
 
int LLMQConnectionRetryTimeout () const
 How long to wait until we allow retrying of a LLMQ connection. More...
 
std::string NetworkIDString () const
 Return the BIP70 network string (main, test or regtest) 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
 
int ExtCoinType () const
 
const std::vector< SeedSpec6 > & FixedSeeds () const
 
const CCheckpointDataCheckpoints () const
 
const ChainTxDataTxData () const
 
void UpdateVersionBitsParameters (Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout, int64_t nWindowSize, int64_t nThresholdStart, int64_t nThresholdMin, int64_t nFalloffCoeff)
 
void UpdateDIP3Parameters (int nActivationHeight, int nEnforcementHeight)
 
void UpdateBudgetParameters (int nMasternodePaymentsStartBlock, int nBudgetPaymentsStartBlock, int nSuperblockStartBlock)
 
void UpdateSubsidyAndDiffParams (int nMinimumDifficultyBlocks, int nHighSubsidyBlocks, int nHighSubsidyFactor)
 
void UpdateLLMQChainLocks (Consensus::LLMQType llmqType)
 
void UpdateLLMQTestParams (int size, int threshold)
 
void UpdateLLMQDevnetParams (int size, int threshold)
 
int PoolMinParticipants () const
 
int PoolNewMinParticipants () const
 
int PoolMaxParticipants () const
 
int PoolNewMaxParticipants () const
 
int FulfilledRequestExpireTime () const
 
const std::vector< std::string > & SporkAddresses () const
 
int MinSporkKeys () const
 
bool BIP9CheckMasternodesUpgraded () const
 

Protected Member Functions

 CChainParams ()
 

Protected Attributes

Consensus::Params consensus
 
CMessageHeader::MessageStartChars pchMessageStart
 
int nDefaultPort
 
uint64_t nPruneAfterHeight
 
std::vector< std::string > vSeeds
 
std::vector< unsigned char > base58Prefixes [MAX_BASE58_TYPES]
 
int nExtCoinType
 
std::string strNetworkID
 
CBlock genesis
 
CBlock devnetGenesis
 
std::vector< SeedSpec6vFixedSeeds
 
bool fDefaultConsistencyChecks
 
bool fRequireStandard
 
bool fRequireRoutableExternalIP
 
bool fMineBlocksOnDemand
 
bool fAllowMultipleAddressesFromGroup
 
bool fAllowMultiplePorts
 
int nLLMQConnectionRetryTimeout
 
CCheckpointData checkpointData
 
ChainTxData chainTxData
 
int nPoolMinParticipants
 
int nPoolNewMinParticipants
 
int nPoolMaxParticipants
 
int nPoolNewMaxParticipants
 
int nFulfilledRequestExpireTime
 
std::vector< std::string > vSporkAddresses
 
int nMinSporkKeys
 
bool fBIP9CheckMasternodesUpgraded
 

Detailed Description

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

There are three: the main network on which people trade goods and services, the public test network which gets reset from time to time and a regression test mode which is intended for private networks only. It has minimal difficulty to ensure that blocks can be found instantly.

Definition at line 41 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 44 of file chainparams.h.

Constructor & Destructor Documentation

◆ CChainParams()

CChainParams::CChainParams ( )
inlineprotected

Definition at line 100 of file chainparams.h.

Member Function Documentation

◆ AllowMultipleAddressesFromGroup()

bool CChainParams::AllowMultipleAddressesFromGroup ( ) const
inline

Allow multiple addresses to be selected from the same network group (e.g.

192.168.x.x)

Definition at line 70 of file chainparams.h.

References fAllowMultipleAddressesFromGroup.

◆ AllowMultiplePorts()

◆ Base58Prefix()

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

◆ BIP9CheckMasternodesUpgraded()

bool CChainParams::BIP9CheckMasternodesUpgraded ( ) const
inline

Definition at line 98 of file chainparams.h.

References fBIP9CheckMasternodesUpgraded.

Referenced by BlockAssembler::CreateNewBlock().

◆ Checkpoints()

const CCheckpointData& CChainParams::Checkpoints ( ) const
inline

Definition at line 82 of file chainparams.h.

References checkpointData.

Referenced by ContextualCheckBlockHeader().

◆ DefaultConsistencyChecks()

bool CChainParams::DefaultConsistencyChecks ( ) const
inline

Default value for -checkmempool and -checkblockindex argument.

Definition at line 61 of file chainparams.h.

References fDefaultConsistencyChecks.

Referenced by AppInitParameterInteraction().

◆ DevNetGenesisBlock()

const CBlock& CChainParams::DevNetGenesisBlock ( ) const
inline

Definition at line 59 of file chainparams.h.

References devnetGenesis.

Referenced by CChainState::LoadGenesisBlock().

◆ DNSSeeds()

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

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

Definition at line 78 of file chainparams.h.

References vSeeds.

Referenced by CConnman::ThreadDNSAddressSeed().

◆ ExtCoinType()

int CChainParams::ExtCoinType ( ) const
inline

Definition at line 80 of file chainparams.h.

References nExtCoinType.

◆ FixedSeeds()

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

Definition at line 81 of file chainparams.h.

References vFixedSeeds.

◆ FulfilledRequestExpireTime()

int CChainParams::FulfilledRequestExpireTime ( ) const
inline

◆ GenesisBlock()

const CBlock& CChainParams::GenesisBlock ( ) const
inline

Definition at line 58 of file chainparams.h.

References genesis.

Referenced by CChainState::LoadGenesisBlock().

◆ GetConsensus()

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

Definition at line 54 of file chainparams.h.

References consensus.

Referenced by CChainState::AcceptBlock(), CChainState::AcceptBlockHeader(), AcceptToMemoryPoolWorker(), CChainState::ActivateBestChain(), AppInitMain(), AppInitParameterInteraction(), llmq::CSigningManager::AsyncSignIfMember(), CDeterministicMNManager::BuildNewListFromBlock(), CalcCbTxMerkleRootQuorums(), llmq::CChainLocksHandler::CheckActiveState(), llmq::CheckLLMQCommitment(), CGovernanceManager::CheckPostponedObjects(), llmq::CSigSharesManager::CollectSigSharesToAnnounce(), llmq::CSigSharesManager::CollectSigSharesToRequest(), CChainState::ConnectBlock(), CChainState::ConnectTip(), ContextualCheckBlockHeader(), BlockAssembler::CreateNewBlock(), CChainState::DisconnectBlock(), CChainState::DisconnectTip(), llmq::CQuorumManager::EnsureQuorumConnections(), llmq::CLLMQUtils::GetAllQuorumMembers(), getblockchaininfo(), getblocktemplate(), CMasternodePayments::GetBlockTxOuts(), getchaintxstats(), llmq::CQuorumBlockProcessor::GetCommitmentsFromBlock(), CDeterministicMNManager::GetListForBlock(), GetMasternodePayment(), CSuperblock::GetNearestSuperblocksHeights(), GetNetworkHashPS(), CSuperblock::GetPaymentsLimit(), llmq::CQuorumManager::GetQuorum(), llmq::CQuorumBlockProcessor::GetQuorumBlockHash(), llmq::CLLMQUtils::GetQuorumConnections(), llmq::CInstantSendManager::HandleFullyConfirmedBlock(), llmq::CInstantSendManager::HandleNewRecoveredSig(), llmq::CDKGDebugManager::InitLocalSessionStatus(), llmq::CDKGSessionHandler::InitNewQuorum(), llmq::InitSession(), IsBlockPayeeValid(), IsBlockValueValid(), CDeterministicMNManager::IsDIP3Enforced(), CSuperblock::IsExpired(), llmq::CQuorumBlockProcessor::IsMiningPhase(), IsOldBudgetBlockValueValid(), llmq::CLLMQUtils::IsQuorumActive(), CSuperblock::IsValidBlockHeight(), LoadBlockIndexDB(), LoadExternalBlockFile(), CChainState::LoadGenesisBlock(), CGovernanceManager::MasternodeRateCheck(), CZMQPublishRawBlockNotifier::NotifyBlock(), CZMQPublishRawChainLockNotifier::NotifyChainLock(), CZMQPublishRawChainLockSigNotifier::NotifyChainLock(), PeerLogicValidation::PeerLogicValidation(), llmq::CSigningManager::PreVerifyRecoveredSig(), llmq::CQuorumBlockProcessor::ProcessBlock(), CDeterministicMNManager::ProcessBlock(), llmq::CQuorumBlockProcessor::ProcessCommitment(), ProcessGetBlockData(), ProcessHeadersMessage(), llmq::CQuorumBlockProcessor::ProcessMessage(), ProcessMessage(), llmq::CSigSharesManager::ProcessMessageSigSesAnn(), ProcessNewBlock(), llmq::CInstantSendManager::ProcessPendingInstantSendLocks(), llmq::CInstantSendManager::ProcessPendingRetryLockTxs(), quorum_info(), quorum_selectquorum(), quorum_sigs_cmd(), CChainState::ReplayBlocks(), CChainState::RollforwardBlock(), llmq::CQuorumManager::ScanQuorums(), llmq::CSigningManager::SelectQuorumForSigning(), PeerLogicValidation::SendMessages(), llmq::CDKGSessionHandler::SleepBeforePhase(), TestBlockValidity(), ModalOverlay::tipUpdate(), llmq::CDKGDebugStatus::ToJson(), llmq::CInstantSendManager::TruncateRecoveredSigsForInputs(), llmq::CInstantSendManager::TrySignInstantSendLock(), CDeterministicMNManager::UndoBlock(), CGovernanceManager::UpdateCachesAndClean(), CDSNotificationInterface::UpdatedBlockTip(), llmq::CDKGSessionManager::UpdatedBlockTip(), llmq::CQuorumManager::UpdatedBlockTip(), llmq::CInstantSendManager::UpdatedBlockTip(), BitcoinGUI::updateHeadersSyncProgressLabel(), UpdateTip(), llmq::CQuorumBlockProcessor::UpgradeDB(), CDeterministicMNManager::UpgradeDBIfNeeded(), llmq::CFinalCommitment::Verify(), CVerifyDB::VerifyDB(), llmq::CFinalCommitment::VerifyNull(), and llmq::CSigSharesManager::VerifySigSharesInv().

◆ GetDefaultPort()

int CChainParams::GetDefaultPort ( ) const
inline

◆ LLMQConnectionRetryTimeout()

int CChainParams::LLMQConnectionRetryTimeout ( ) const
inline

How long to wait until we allow retrying of a LLMQ connection.

Definition at line 74 of file chainparams.h.

References nLLMQConnectionRetryTimeout.

◆ MessageStart()

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

◆ MineBlocksOnDemand()

bool CChainParams::MineBlocksOnDemand ( ) const
inline

Make miner stop after a block is found.

In RPC, don't return until nGenProcLimit blocks are generated

Definition at line 68 of file chainparams.h.

References fMineBlocksOnDemand.

Referenced by AppInitParameterInteraction(), BlockAssembler::CreateNewBlock(), setmocktime(), and llmq::CDKGSessionHandler::SleepBeforePhase().

◆ MinSporkKeys()

int CChainParams::MinSporkKeys ( ) const
inline

Definition at line 97 of file chainparams.h.

References nMinSporkKeys.

◆ NetworkIDString()

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

◆ PoolMaxParticipants()

int CChainParams::PoolMaxParticipants ( ) const
inline

Definition at line 93 of file chainparams.h.

References nPoolMaxParticipants.

Referenced by CPrivateSend::GetMaxPoolParticipants().

◆ PoolMinParticipants()

int CChainParams::PoolMinParticipants ( ) const
inline

Definition at line 91 of file chainparams.h.

References nPoolMinParticipants.

Referenced by CPrivateSend::GetMinPoolParticipants().

◆ PoolNewMaxParticipants()

int CChainParams::PoolNewMaxParticipants ( ) const
inline

Definition at line 94 of file chainparams.h.

References nPoolNewMaxParticipants.

Referenced by CPrivateSend::GetMaxPoolParticipants().

◆ PoolNewMinParticipants()

int CChainParams::PoolNewMinParticipants ( ) const
inline

Definition at line 92 of file chainparams.h.

References nPoolNewMinParticipants.

Referenced by CPrivateSend::GetMinPoolParticipants().

◆ PruneAfterHeight()

uint64_t CChainParams::PruneAfterHeight ( ) const
inline

Definition at line 66 of file chainparams.h.

References nPruneAfterHeight.

Referenced by FlushStateToDisk().

◆ RequireRoutableExternalIP()

bool CChainParams::RequireRoutableExternalIP ( ) const
inline

Require addresses specified with "-externalip" parameter to be routable.

Definition at line 65 of file chainparams.h.

References fRequireRoutableExternalIP.

Referenced by AddLocal(), AppInitParameterInteraction(), CActiveMasternodeManager::Init(), and CActiveMasternodeManager::IsValidNetAddr().

◆ RequireStandard()

bool CChainParams::RequireStandard ( ) const
inline

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

Definition at line 63 of file chainparams.h.

References fRequireStandard.

Referenced by AppInitParameterInteraction().

◆ SporkAddresses()

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

Definition at line 96 of file chainparams.h.

References vSporkAddresses.

Referenced by AppInitMain().

◆ TxData()

const ChainTxData& CChainParams::TxData ( ) const
inline

Definition at line 83 of file chainparams.h.

References chainTxData.

Referenced by LoadChainTip(), CWallet::ScanForWalletTransactions(), and UpdateTip().

◆ UpdateBudgetParameters()

void CChainParams::UpdateBudgetParameters ( int  nMasternodePaymentsStartBlock,
int  nBudgetPaymentsStartBlock,
int  nSuperblockStartBlock 
)

◆ UpdateDIP3Parameters()

void CChainParams::UpdateDIP3Parameters ( int  nActivationHeight,
int  nEnforcementHeight 
)

◆ UpdateLLMQChainLocks()

void CChainParams::UpdateLLMQChainLocks ( Consensus::LLMQType  llmqType)

Definition at line 123 of file chainparams.cpp.

References consensus, and Consensus::Params::llmqTypeChainLocks.

◆ UpdateLLMQDevnetParams()

void CChainParams::UpdateLLMQDevnetParams ( int  size,
int  threshold 
)

Definition at line 135 of file chainparams.cpp.

References consensus, Consensus::LLMQ_DEVNET, and Consensus::Params::llmqs.

◆ UpdateLLMQTestParams()

void CChainParams::UpdateLLMQTestParams ( int  size,
int  threshold 
)

Definition at line 127 of file chainparams.cpp.

References consensus, Consensus::LLMQ_TEST, and Consensus::Params::llmqs.

◆ UpdateSubsidyAndDiffParams()

void CChainParams::UpdateSubsidyAndDiffParams ( int  nMinimumDifficultyBlocks,
int  nHighSubsidyBlocks,
int  nHighSubsidyFactor 
)

◆ UpdateVersionBitsParameters()

void CChainParams::UpdateVersionBitsParameters ( Consensus::DeploymentPos  d,
int64_t  nStartTime,
int64_t  nTimeout,
int64_t  nWindowSize,
int64_t  nThresholdStart,
int64_t  nThresholdMin,
int64_t  nFalloffCoeff 
)

Member Data Documentation

◆ base58Prefixes

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

◆ chainTxData

◆ checkpointData

◆ consensus

◆ devnetGenesis

CBlock CChainParams::devnetGenesis
protected

Definition at line 111 of file chainparams.h.

Referenced by CDevNetParams::CDevNetParams(), and DevNetGenesisBlock().

◆ fAllowMultipleAddressesFromGroup

bool CChainParams::fAllowMultipleAddressesFromGroup
protected

◆ fAllowMultiplePorts

bool CChainParams::fAllowMultiplePorts
protected

◆ fBIP9CheckMasternodesUpgraded

bool CChainParams::fBIP9CheckMasternodesUpgraded
protected

◆ fDefaultConsistencyChecks

bool CChainParams::fDefaultConsistencyChecks
protected

◆ fMineBlocksOnDemand

bool CChainParams::fMineBlocksOnDemand
protected

◆ fRequireRoutableExternalIP

bool CChainParams::fRequireRoutableExternalIP
protected

◆ fRequireStandard

bool CChainParams::fRequireStandard
protected

◆ genesis

◆ nDefaultPort

◆ nExtCoinType

int CChainParams::nExtCoinType
protected

◆ nFulfilledRequestExpireTime

int CChainParams::nFulfilledRequestExpireTime
protected

◆ nLLMQConnectionRetryTimeout

int CChainParams::nLLMQConnectionRetryTimeout
protected

◆ nMinSporkKeys

int CChainParams::nMinSporkKeys
protected

◆ nPoolMaxParticipants

int CChainParams::nPoolMaxParticipants
protected

◆ nPoolMinParticipants

int CChainParams::nPoolMinParticipants
protected

◆ nPoolNewMaxParticipants

int CChainParams::nPoolNewMaxParticipants
protected

◆ nPoolNewMinParticipants

int CChainParams::nPoolNewMinParticipants
protected

◆ nPruneAfterHeight

uint64_t CChainParams::nPruneAfterHeight
protected

◆ pchMessageStart

◆ strNetworkID

std::string CChainParams::strNetworkID
protected

◆ vFixedSeeds

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

◆ vSeeds

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

◆ vSporkAddresses

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

The documentation for this class was generated from the following files:
Released under the MIT license