Changeset View
Changeset View
Standalone View
Standalone View
src/chainparams.cpp
Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | CMainParams() { | ||||
consensus.powLimit = uint256S( | consensus.powLimit = uint256S( | ||||
"00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); | "00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); | ||||
// two weeks | // two weeks | ||||
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; | consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; | ||||
consensus.nPowTargetSpacing = 10 * 60; | consensus.nPowTargetSpacing = 10 * 60; | ||||
consensus.fPowAllowMinDifficultyBlocks = false; | consensus.fPowAllowMinDifficultyBlocks = false; | ||||
consensus.fPowNoRetargeting = false; | consensus.fPowNoRetargeting = false; | ||||
// 95% of 2016 | |||||
consensus.nRuleChangeActivationThreshold = 1916; | |||||
// nPowTargetTimespan / nPowTargetSpacing | // nPowTargetTimespan / nPowTargetSpacing | ||||
consensus.nMinerConfirmationWindow = 2016; | consensus.nMinerConfirmationWindow = 2016; | ||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28; | consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY] = { | ||||
.bit = 28, | |||||
// 95% of 2016 | |||||
.nActivationThreshold = 1916, | |||||
// January 1, 2008 | // January 1, 2008 | ||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = | .nStartTime = 1199145601, | ||||
1199145601; | |||||
// December 31, 2008 | // December 31, 2008 | ||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = | .nTimeout = 1230767999, | ||||
1230767999; | }; | ||||
// The best chain should have at least this much work. | // The best chain should have at least this much work. | ||||
consensus.nMinimumChainWork = | consensus.nMinimumChainWork = | ||||
ChainParamsConstants::MAINNET_MINIMUM_CHAIN_WORK; | ChainParamsConstants::MAINNET_MINIMUM_CHAIN_WORK; | ||||
// By default assume that the signatures in ancestors of this block are | // By default assume that the signatures in ancestors of this block are | ||||
// valid. | // valid. | ||||
consensus.defaultAssumeValid = | consensus.defaultAssumeValid = | ||||
▲ Show 20 Lines • Show All 125 Lines • ▼ Show 20 Lines | CMainParams() { | ||||
// (height 523992). | // (height 523992). | ||||
chainTxData = ChainTxData{ | chainTxData = ChainTxData{ | ||||
// UNIX timestamp of last known number of transactions. | // UNIX timestamp of last known number of transactions. | ||||
1522608016, | 1522608016, | ||||
// Total number of transactions between genesis and that timestamp | // Total number of transactions between genesis and that timestamp | ||||
// (the tx=... number in the ChainStateFlushed debug.log lines) | // (the tx=... number in the ChainStateFlushed debug.log lines) | ||||
248589038, | 248589038, | ||||
// Estimated number of transactions per second after that timestamp. | // Estimated number of transactions per second after that timestamp. | ||||
3.2}; | 3.2, | ||||
}; | |||||
} | } | ||||
}; | }; | ||||
/** | /** | ||||
* Testnet (v3) | * Testnet (v3) | ||||
*/ | */ | ||||
class CTestNetParams : public CChainParams { | class CTestNetParams : public CChainParams { | ||||
public: | public: | ||||
Show All 14 Lines | CTestNetParams() { | ||||
consensus.powLimit = uint256S( | consensus.powLimit = uint256S( | ||||
"00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); | "00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); | ||||
// two weeks | // two weeks | ||||
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; | consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; | ||||
consensus.nPowTargetSpacing = 10 * 60; | consensus.nPowTargetSpacing = 10 * 60; | ||||
consensus.fPowAllowMinDifficultyBlocks = true; | consensus.fPowAllowMinDifficultyBlocks = true; | ||||
consensus.fPowNoRetargeting = false; | consensus.fPowNoRetargeting = false; | ||||
// 75% for testchains | |||||
consensus.nRuleChangeActivationThreshold = 1512; | |||||
// nPowTargetTimespan / nPowTargetSpacing | // nPowTargetTimespan / nPowTargetSpacing | ||||
consensus.nMinerConfirmationWindow = 2016; | consensus.nMinerConfirmationWindow = 2016; | ||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28; | consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY] = { | ||||
.bit = 28, | |||||
// January 1, 2008 | // January 1, 2008 | ||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = | .nStartTime = 1199145601, | ||||
1199145601; | |||||
// December 31, 2008 | // December 31, 2008 | ||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = | .nTimeout = 1230767999, | ||||
1230767999; | }; | ||||
// The best chain should have at least this much work. | // The best chain should have at least this much work. | ||||
consensus.nMinimumChainWork = | consensus.nMinimumChainWork = | ||||
ChainParamsConstants::TESTNET_MINIMUM_CHAIN_WORK; | ChainParamsConstants::TESTNET_MINIMUM_CHAIN_WORK; | ||||
// By default assume that the signatures in ancestors of this block are | // By default assume that the signatures in ancestors of this block are | ||||
// valid. | // valid. | ||||
consensus.defaultAssumeValid = | consensus.defaultAssumeValid = | ||||
▲ Show 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | CRegTestParams() { | ||||
consensus.powLimit = uint256S( | consensus.powLimit = uint256S( | ||||
"7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); | "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); | ||||
// two weeks | // two weeks | ||||
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; | consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; | ||||
consensus.nPowTargetSpacing = 10 * 60; | consensus.nPowTargetSpacing = 10 * 60; | ||||
consensus.fPowAllowMinDifficultyBlocks = true; | consensus.fPowAllowMinDifficultyBlocks = true; | ||||
consensus.fPowNoRetargeting = true; | consensus.fPowNoRetargeting = true; | ||||
// 75% for testchains | |||||
consensus.nRuleChangeActivationThreshold = 108; | |||||
// Faster than normal for regtest (144 instead of 2016) | // Faster than normal for regtest (144 instead of 2016) | ||||
consensus.nMinerConfirmationWindow = 144; | consensus.nMinerConfirmationWindow = 144; | ||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28; | consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY] = { | ||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 0; | .bit = 28, | ||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = | // 75% of 144 | ||||
Consensus::BIP9Deployment::NO_TIMEOUT; | .nActivationThreshold = 108, | ||||
}; | |||||
// The best chain should have at least this much work. | // The best chain should have at least this much work. | ||||
consensus.nMinimumChainWork = uint256S("0x00"); | consensus.nMinimumChainWork = uint256S("0x00"); | ||||
// By default assume that the signatures in ancestors of this block are | // By default assume that the signatures in ancestors of this block are | ||||
// valid. | // valid. | ||||
consensus.defaultAssumeValid = BlockHash(); | consensus.defaultAssumeValid = BlockHash(); | ||||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |