Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

chainparams.h File Reference
#include <chainparamsbase.h>
#include <consensus/params.h>
#include <primitives/block.h>
#include <protocol.h>
#include <memory>
#include <vector>
+ Include dependency graph for chainparams.h:

Go to the source code of this file.

Classes

struct  SeedSpec6
 
struct  CCheckpointData
 
struct  ChainTxData
 
class  CChainParams
 CChainParams defines various tweakable parameters of a given instance of the Dash system. More...
 

Typedefs

typedef std::map< int, uint256MapCheckpoints
 

Functions

std::unique_ptr< CChainParamsCreateChainParams (const std::string &chain)
 Creates and returns a std::unique_ptr<CChainParams> of the chosen chain. More...
 
const CChainParamsParams ()
 Return the currently selected parameters. More...
 
void SelectParams (const std::string &chain)
 Sets the params returned by Params() to those for the given BIP70 chain name. More...
 
void UpdateVersionBitsParameters (Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout, int64_t nWindowSize, int64_t nThresholdStart, int64_t nThresholdMin, int64_t nFalloffCoeff)
 Allows modifying the Version Bits regtest parameters. More...
 
void UpdateDIP3Parameters (int nActivationHeight, int nEnforcementHeight)
 Allows modifying the DIP3 activation and enforcement height. More...
 
void UpdateBudgetParameters (int nMasternodePaymentsStartBlock, int nBudgetPaymentsStartBlock, int nSuperblockStartBlock)
 Allows modifying the budget regtest parameters. More...
 
void UpdateDevnetSubsidyAndDiffParams (int nMinimumDifficultyBlocks, int nHighSubsidyBlocks, int nHighSubsidyFactor)
 Allows modifying the subsidy and difficulty devnet parameters. More...
 
void UpdateDevnetLLMQChainLocks (Consensus::LLMQType llmqType)
 Allows modifying the LLMQ type for ChainLocks. More...
 
void UpdateLLMQTestParams (int size, int threshold)
 Allows modifying parameters of the test LLMQ. More...
 
void UpdateLLMQDevnetParams (int size, int threshold)
 Allows modifying parameters of the devnet LLMQ. More...
 

Typedef Documentation

◆ MapCheckpoints

typedef std::map<int, uint256> MapCheckpoints

Definition at line 22 of file chainparams.h.

Function Documentation

◆ CreateChainParams()

std::unique_ptr<CChainParams> CreateChainParams ( const std::string &  chain)

Creates and returns a std::unique_ptr<CChainParams> of the chosen chain.

Returns
a CChainParams* of the chosen chain.
Exceptions
astd::runtime_error if the chain is not supported.

Definition at line 952 of file chainparams.cpp.

References CBaseChainParams::DEVNET, CBaseChainParams::MAIN, CBaseChainParams::REGTEST, strprintf, and CBaseChainParams::TESTNET.

Referenced by CheckService(), DeserializeAndCheckBlockTest(), HelpMessage(), PaymentServer::ipcParseCommandLine(), and SelectParams().

◆ Params()

const CChainParams& Params ( )

Return the currently selected parameters.

This won't change after app startup, except for unit tests.

Definition at line 947 of file chainparams.cpp.

References globalChainParams.

Referenced by AcceptToMemoryPool(), CNetFulfilledRequestManager::AddFulfilledRequest(), AddLocal(), AppInitMain(), AppInitParameterInteraction(), llmq::CSigningManager::AsyncSignIfMember(), BuildDMNListEntry(), CDeterministicMNManager::BuildNewListFromBlock(), BuildSimplifiedMNListDiff(), CalcCbTxMerkleRootQuorums(), CBitcoinExtKeyBase< K, Size, Type >::CBitcoinExtKeyBase(), llmq::CDKGSessionManager::CDKGSessionManager(), llmq::CChainLocksHandler::CheckActiveState(), CheckCbTx(), llmq::CheckLLMQCommitment(), CGovernanceManager::CheckPostponedObjects(), CheckService(), CGovernanceVote::CheckSignature(), CSporkMessage::CheckSignature(), CheckSpecialTx(), llmq::CChainLocksHandler::Cleanup(), CDeterministicMNManager::CleanupCache(), llmq::CSigSharesManager::CollectSigSharesToAnnounce(), llmq::CSigSharesManager::CollectSigSharesToRequest(), CChainState::ConnectBlock(), CConnman::ConnectNode(), ContextualCheckBlockHeader(), BlockAssembler::CreateNewBlock(), llmq::CRecoveredSigsDb::CRecoveredSigsDb(), CHDChain::DeriveChildExtKey(), BitcoinUnits::description(), CChainState::DisconnectBlock(), CPrivateSendClientSession::DoAutomaticDenominating(), llmq::CChainLocksHandler::DoInvalidateBlock(), llmq::CChainLocksHandler::EnforceBestChainLock(), llmq::CQuorumManager::EnsureQuorumConnections(), PartiallyDownloadedBlock::FillBlock(), FlushStateToDisk(), CConnman::GetAddedNodeInfo(), llmq::CLLMQUtils::GetAllQuorumMembers(), getblockchaininfo(), GetBlockChecked(), getblockstats(), GetBlockSubsidy(), getblocktemplate(), CMasternodePayments::GetBlockTxOuts(), llmq::CChainLocksHandler::GetBlockTxs(), getchaintxstats(), llmq::CQuorumBlockProcessor::GetCommitmentsFromBlock(), getgovernanceinfo(), CHDPubKey::GetKeyPath(), ClientModel::getLastBlockDate(), ClientModel::getLastBlockHash(), GetListenPort(), CDeterministicMNManager::GetListForBlock(), CActiveMasternodeManager::GetLocalAddress(), GetMasternodePayment(), CPrivateSend::GetMaxPoolParticipants(), getmerkleblocks(), llmq::CQuorumBlockProcessor::GetMinableCommitment(), llmq::CQuorumBlockProcessor::GetMinedAndActiveCommitmentsUntilBlock(), getmininginfo(), CPrivateSend::GetMinPoolParticipants(), CSuperblock::GetNearestSuperblocksHeights(), GetNetworkHashPS(), CSuperblock::GetPaymentsLimit(), llmq::CQuorumManager::GetQuorum(), llmq::CQuorumBlockProcessor::GetQuorumBlockHash(), llmq::CLLMQUtils::GetQuorumConnections(), getrawtransaction(), CSporkMessage::GetSignerKeyID(), gettxoutproof(), ClientModel::getVerificationProgress(), llmq::CInstantSendManager::HandleFullyConfirmedBlock(), llmq::CInstantSendManager::HandleNewInputLockRecoveredSig(), llmq::CInstantSendManager::HandleNewRecoveredSig(), CNetFulfilledRequestManager::HasFulfilledRequest(), CActiveMasternodeManager::Init(), llmq::CDKGDebugManager::InitLocalSessionStatus(), llmq::CDKGSessionHandler::InitNewQuorum(), llmq::InitSession(), invalidateblock(), IsBlockPayeeValid(), IsBlockValueValid(), CGovernanceObject::IsCollateralValid(), CDeterministicMNManager::IsDIP3Enforced(), CSuperblock::IsExpired(), IsInitialBlockDownload(), llmq::CQuorumBlockProcessor::IsMiningPhase(), IsOldBudgetBlockValueValid(), llmq::CLLMQUtils::IsQuorumActive(), CBitcoinSecret::IsValid(), CSuperblock::IsValidBlockHeight(), CActiveMasternodeManager::IsValidNetAddr(), listsinceblock(), LoadMempool(), main(), CGovernanceManager::MasternodeRateCheck(), BitcoinUnits::name(), CZMQPublishRawBlockNotifier::NotifyBlock(), CZMQPublishRawChainLockNotifier::NotifyChainLock(), CZMQPublishRawChainLockSigNotifier::NotifyChainLock(), CConnman::OpenNetworkConnection(), PeerLogicValidation::PeerLogicValidation(), preciousblock(), llmq::CSigningManager::PreVerifyRecoveredSig(), llmq::CQuorumBlockProcessor::ProcessBlock(), CDeterministicMNManager::ProcessBlock(), llmq::CQuorumBlockProcessor::ProcessCommitment(), ProcessGetBlockData(), llmq::CInstantSendManager::ProcessInstantSendLock(), llmq::CQuorumBlockProcessor::ProcessMessage(), CMNAuth::ProcessMessage(), ProcessMessage(), PeerLogicValidation::ProcessMessages(), llmq::CSigSharesManager::ProcessMessageSigSesAnn(), llmq::CChainLocksHandler::ProcessNewChainLock(), llmq::CInstantSendManager::ProcessNewTransaction(), llmq::CInstantSendManager::ProcessPendingInstantSendLocks(), llmq::CInstantSendManager::ProcessPendingRetryLockTxs(), CMasternodeSync::ProcessTick(), PruneAndFlush(), pruneblockchain(), PruneBlockFilesManual(), CConnman::PushMessage(), CMNAuth::PushMNAUTH(), quorum_dkgstatus(), quorum_info(), quorum_list(), quorum_memberof(), quorum_selectquorum(), quorum_sigs_cmd(), CFlatDB< T >::Read(), CNode::ReceiveMsgBytes(), reconsiderblock(), CNetFulfilledRequestManager::RemoveAllFulfilledRequests(), CNetFulfilledRequestManager::RemoveFulfilledRequest(), CGovernanceManager::RequestGovernanceObject(), CGovernanceManager::RequestGovernanceObjectVotes(), llmq::CInstantSendManager::ResolveBlockConflicts(), rest_block(), rest_tx(), CWallet::ScanForWalletTransactions(), llmq::CQuorumManager::ScanQuorums(), llmq::CSigningManager::SelectQuorumForSigning(), PeerLogicValidation::SendMessages(), RPCConsole::setClientModel(), CBitcoinSecret::SetKey(), CBitcoinExtKeyBase< K, Size, Type >::SetKey(), setmocktime(), SendCoinsDialog::setModel(), GUIUtil::setupAddressWidget(), CGovernanceVote::Sign(), CSporkMessage::Sign(), llmq::CDKGSessionHandler::SleepBeforePhase(), submitblock(), CConnman::ThreadDNSAddressSeed(), ThreadImport(), CConnman::ThreadOpenConnections(), CConnman::ThreadOpenMasternodeConnections(), ModalOverlay::tipUpdate(), llmq::CDKGDebugSessionStatus::ToJson(), llmq::CDKGDebugStatus::ToJson(), llmq::CInstantSendManager::TruncateRecoveredSigsForInputs(), llmq::CChainLocksHandler::TrySignChainTip(), llmq::CInstantSendManager::TrySignInstantSendLock(), CDeterministicMNManager::UndoBlock(), CGovernanceManager::UpdateCachesAndClean(), CDSNotificationInterface::UpdatedBlockTip(), llmq::CDKGSessionManager::UpdatedBlockTip(), llmq::CQuorumManager::UpdatedBlockTip(), llmq::CInstantSendManager::UpdatedBlockTip(), BitcoinGUI::updateHeadersSyncProgressLabel(), CGovernanceObject::UpdateSentinelVariables(), llmq::CQuorumBlockProcessor::UpgradeDB(), CDeterministicMNManager::UpgradeDBIfNeeded(), llmq::CFinalCommitment::Verify(), verifychain(), PaymentServer::verifyNetwork(), llmq::CFinalCommitment::VerifyNull(), llmq::CSigSharesManager::VerifySigSharesInv(), and CFlatDB< T >::Write().

◆ SelectParams()

void SelectParams ( const std::string &  chain)

Sets the params returned by Params() to those for the given BIP70 chain name.

Exceptions
std::runtime_errorwhen the chain is not supported.

Definition at line 965 of file chainparams.cpp.

References CreateChainParams(), globalChainParams, and SelectBaseParams().

Referenced by AppInit(), AppInitRawTx(), PaymentServer::ipcParseCommandLine(), and main().

◆ UpdateBudgetParameters()

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

Allows modifying the budget regtest parameters.

Definition at line 981 of file chainparams.cpp.

References globalChainParams.

Referenced by AppInitParameterInteraction().

◆ UpdateDevnetLLMQChainLocks()

void UpdateDevnetLLMQChainLocks ( Consensus::LLMQType  llmqType)

Allows modifying the LLMQ type for ChainLocks.

Definition at line 991 of file chainparams.cpp.

References globalChainParams.

Referenced by AppInitParameterInteraction().

◆ UpdateDevnetSubsidyAndDiffParams()

void UpdateDevnetSubsidyAndDiffParams ( int  nMinimumDifficultyBlocks,
int  nHighSubsidyBlocks,
int  nHighSubsidyFactor 
)

Allows modifying the subsidy and difficulty devnet parameters.

Definition at line 986 of file chainparams.cpp.

References globalChainParams.

Referenced by AppInitParameterInteraction().

◆ UpdateDIP3Parameters()

void UpdateDIP3Parameters ( int  nActivationHeight,
int  nEnforcementHeight 
)

Allows modifying the DIP3 activation and enforcement height.

Definition at line 976 of file chainparams.cpp.

References globalChainParams.

Referenced by AppInitParameterInteraction().

◆ UpdateLLMQDevnetParams()

void UpdateLLMQDevnetParams ( int  size,
int  threshold 
)

Allows modifying parameters of the devnet LLMQ.

Definition at line 1001 of file chainparams.cpp.

References globalChainParams.

Referenced by AppInitParameterInteraction().

◆ UpdateLLMQTestParams()

void UpdateLLMQTestParams ( int  size,
int  threshold 
)

Allows modifying parameters of the test LLMQ.

Definition at line 996 of file chainparams.cpp.

References globalChainParams.

Referenced by AppInitParameterInteraction().

◆ UpdateVersionBitsParameters()

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

Allows modifying the Version Bits regtest parameters.

Definition at line 971 of file chainparams.cpp.

References globalChainParams.

Referenced by AppInitParameterInteraction().

Released under the MIT license