Dash Core  0.12.2.1
P2P Digital Currency
chainparams.cpp File Reference
#include "chainparams.h"
#include "consensus/merkle.h"
#include "tinyformat.h"
#include "util.h"
#include "utilstrencodings.h"
#include <assert.h>
#include <boost/assign/list_of.hpp>
#include "chainparamsseeds.h"

Go to the source code of this file.

Classes

class  CMainParams
 
class  CTestNetParams
 
class  CRegTestParams
 

Functions

static CBlock CreateGenesisBlock (const char *pszTimestamp, const CScript &genesisOutputScript, uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount &genesisReward)
 
static CBlock CreateGenesisBlock (uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount &genesisReward)
 
const CChainParamsParams ()
 
CChainParamsParams (const std::string &chain)
 
void SelectParams (const std::string &network)
 

Variables

static CMainParams mainParams
 
static CTestNetParams testNetParams
 
static CRegTestParams regTestParams
 
static CChainParamspCurrentParams = 0
 

Function Documentation

◆ CreateGenesisBlock() [1/2]

static CBlock CreateGenesisBlock ( const char *  pszTimestamp,
const CScript genesisOutputScript,
uint32_t  nTime,
uint32_t  nNonce,
uint32_t  nBits,
int32_t  nVersion,
const CAmount genesisReward 
)
static

◆ CreateGenesisBlock() [2/2]

static CBlock CreateGenesisBlock ( uint32_t  nTime,
uint32_t  nNonce,
uint32_t  nBits,
int32_t  nVersion,
const CAmount genesisReward 
)
static

Build the genesis block. Note that the output of its generation transaction cannot be spent since it did not originally exist in the database.

CBlock(hash=00000ffd590b14, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=e0028e, nTime=1390095618, nBits=1e0ffff0, nNonce=28917698, vtx=1) CTransaction(hash=e0028e, ver=1, vin.size=1, vout.size=1, nLockTime=0) CTxIn(COutPoint(000000, -1), coinbase 04ffff001d01044c5957697265642030392f4a616e2f3230313420546865204772616e64204578706572696d656e7420476f6573204c6976653a204f76657273746f636b2e636f6d204973204e6f7720416363657074696e6720426974636f696e73) CTxOut(nValue=50.00000000, scriptPubKey=0xA9037BAC7050C479B121CF) vMerkleTree: e0028e

Definition at line 52 of file chainparams.cpp.

◆ Params() [1/2]

const CChainParams& Params ( )

Return the currently selected parameters. This won't change after app startup, except for unit tests.

Definition at line 424 of file chainparams.cpp.

Referenced by AcceptToMemoryPoolWorker(), CNetFulfilledRequestManager::AddFulfilledRequest(), AppInit2(), CConnman::BeginMessage(), CBitcoinExtKeyBase< K, Size, Type >::CBitcoinExtKeyBase(), CPrivateSendServer::ChargeFees(), CheckBlockHeader(), CMasternodeBroadcast::CheckOutpoint(), CGovernanceManager::CheckPostponedObjects(), CSporkMessage::CheckSignature(), ConnectBlock(), CConnman::ConnectNode(), ContextualCheckBlock(), ContextualCheckBlockHeader(), ContextualCheckTransaction(), CMasternodeBroadcast::Create(), CreateNewBlock(), CHDChain::DeriveChildExtKey(), BitcoinUnits::description(), DisconnectBlocks(), CMasternodeMan::DsegUpdate(), FlushStateToDisk(), generate(), CBitcoinAddress::Get(), CConnman::GetAddedNodeInfo(), getblock(), getblockchaininfo(), GetBlockSubsidy(), getblocktemplate(), getgovernanceinfo(), CBitcoinAddress::GetIndexKey(), getinfo(), CBitcoinAddress::GetKeyID(), CHDPubKey::GetKeyPath(), ClientModel::getLastBlockDate(), GetListenPort(), GetMasternodePayment(), CPrivateSend::GetMaxPoolTransactions(), getmininginfo(), GetNetworkHashPS(), GetNextWorkRequired(), CSuperblock::GetPaymentsLimit(), getrawtransaction(), CActiveMasternode::GetStatus(), gettxoutproof(), ClientModel::getVerificationProgress(), HelpMessage(), invalidateblock(), PaymentServer::ipcParseCommandLine(), IsBlockPayeeValid(), IsBlockValueValid(), CGovernanceObject::IsCollateralValid(), CTxLockVote::IsExpired(), CTxLockCandidate::IsExpired(), IsInitialBlockDownload(), CMasternode::IsInputAssociatedWithPubkey(), CBitcoinAddress::IsScript(), CBitcoinAddress::IsValid(), CBitcoinSecret::IsValid(), CSuperblock::IsValidBlockHeight(), CMasternode::IsValidNetAddr(), LoadBlockIndexDB(), CBlockTreeDB::LoadBlockIndexGuts(), main(), CActiveMasternode::ManageState(), CActiveMasternode::ManageStateInitial(), CActiveMasternode::ManageStateLocal(), CGovernanceManager::MasternodeRateCheck(), BitcoinUnits::name(), CZMQPublishRawBlockNotifier::NotifyBlock(), PrepareShutdown(), CMasternodeMan::ProcessMasternodeConnections(), CMasternodeMan::ProcessMessage(), ProcessMessage(), ProcessMessages(), CMasternodeSync::ProcessTick(), CFlatDB< T >::Read(), CMasternodeConfig::read(), CAddrDB::Read(), CBanDB::Read(), CNode::ReceiveMsgBytes(), reconsiderblock(), ReprocessBlocks(), CGovernanceManager::RequestGovernanceObject(), CGovernanceManager::RequestGovernanceObjectVotes(), CInstantSend::ResolveConflicts(), rest_block(), rest_tx(), CWallet::ScanForWalletTransactions(), SelectParams(), SendMessages(), CBitcoinAddress::Set(), RPCConsole::setClientModel(), setgenerate(), CBitcoinSecret::SetKey(), CBitcoinExtKeyBase< K, Size, Type >::SetKey(), setmocktime(), CMasternodeBroadcast::SimpleCheck(), submitblock(), CConnman::ThreadDNSAddressSeed(), ThreadImport(), CConnman::ThreadOpenAddedConnections(), CConnman::ThreadOpenConnections(), ThreadSendAlert(), ModalOverlay::tipUpdate(), CGovernanceManager::UpdateCachesAndClean(), CDSNotificationInterface::UpdatedBlockTip(), BitcoinGUI::updateHeadersSyncProgressLabel(), CMasternode::UpdateLastPaid(), CGovernanceObject::UpdateSentinelVariables(), UpdateTip(), verifychain(), PaymentServer::verifyNetwork(), CFlatDB< T >::Write(), CAddrDB::Write(), and CBanDB::Write().

◆ Params() [2/2]

CChainParams& Params ( const std::string &  chain)
Returns
CChainParams for the given BIP70 chain name.

Definition at line 429 of file chainparams.cpp.

◆ 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 441 of file chainparams.cpp.

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

Variable Documentation

◆ mainParams

CMainParams mainParams
static

Definition at line 205 of file chainparams.cpp.

Referenced by Params().

◆ pCurrentParams

CChainParams* pCurrentParams = 0
static

Definition at line 422 of file chainparams.cpp.

Referenced by Params(), and SelectParams().

◆ regTestParams

CRegTestParams regTestParams
static

Definition at line 420 of file chainparams.cpp.

Referenced by Params().

◆ testNetParams

CTestNetParams testNetParams
static

Definition at line 322 of file chainparams.cpp.

Referenced by Params().