Change some testnet and regtest parameters

This commit is contained in:
lateminer
2018-10-11 23:44:09 +03:00
parent 2a3074a1eb
commit 09d7ba178d

View File

@@ -190,10 +190,10 @@ class CTestNetParams : public CChainParams {
public:
CTestNetParams() {
strNetworkID = "test";
consensus.nMaxReorganizationDepth = 50;
consensus.nMajorityEnforceBlockUpgrade = 51;
consensus.nMajorityRejectBlockOutdated = 75;
consensus.nMajorityWindow = 100;
consensus.nMaxReorganizationDepth = 500;
consensus.nMajorityEnforceBlockUpgrade = 750;
consensus.nMajorityRejectBlockOutdated = 950;
consensus.nMajorityWindow = 1000;
consensus.powLimit = uint256S("0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.posLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.posLimitV2 = uint256S("000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffff");
@@ -269,13 +269,13 @@ class CRegTestParams : public CChainParams {
public:
CRegTestParams() {
strNetworkID = "regtest";
consensus.nMaxReorganizationDepth = 500;
consensus.nMajorityEnforceBlockUpgrade = 750;
consensus.nMajorityRejectBlockOutdated = 950;
consensus.nMajorityWindow = 1000;
consensus.powLimit = uint256S("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.posLimit = uint256S("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.posLimitV2 = uint256S("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nMaxReorganizationDepth = 50;
consensus.nMajorityEnforceBlockUpgrade = 51;
consensus.nMajorityRejectBlockOutdated = 75;
consensus.nMajorityWindow = 100;
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.posLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.posLimitV2 = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nTargetTimespan = 16 * 60; // 16 mins
consensus.nTargetSpacingV1 = 60;
consensus.nTargetSpacing = 64;
@@ -283,8 +283,8 @@ public:
consensus.BIP34Hash = uint256();
consensus.fPowAllowMinDifficultyBlocks = true;
consensus.fPowNoRetargeting = true;
consensus.nRuleChangeActivationThreshold = 1916; // 95% of 2016
consensus.nMinerConfirmationWindow = 2016; // nTargetTimespan / nTargetSpacing
consensus.nRuleChangeActivationThreshold = 108;// 75% for regtest
consensus.nMinerConfirmationWindow = 144; // Faster than normal for regtest (144 instead of 2016)
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008
@@ -294,17 +294,15 @@ public:
// consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 999999999999ULL; // never
// consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 0; // out of time
consensus.nProtocolV1RetargetingFixedTime = 1400000000;
consensus.nProtocolV2Time = 1410000000;
consensus.nProtocolV3Time = 1420000000;
consensus.nProtocolV1RetargetingFixedTime = 1395631999;
consensus.nProtocolV2Time = 1407053625;
consensus.nProtocolV3Time = 1444028400;
consensus.nLastPOWBlock = 1000;
consensus.nStakeTimestampMask = 0xf;
consensus.nCoinbaseMaturity = 50;
consensus.nStakeMinConfirmations = 50;
consensus.nStakeMinAge = 1 * 60 * 60;
/**
* The message start string is designed to be unlikely to occur in normal data.
* The characters are rarely used upper ASCII, not valid as UTF-8, and produce
* a large 32-bit integer with any alignment.
*/
pchMessageStart[0] = 0x70;
pchMessageStart[1] = 0x35;
pchMessageStart[2] = 0x22;
@@ -313,41 +311,17 @@ public:
nMaxTipAge = 0x7fffffff;
nPruneAfterHeight = 100000;
/**
* 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=000001faef25dec4fbcf906e6242621df2c183bf232f263d0ba5b101911e4563, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=12630d16a97f24b287c8c2594dda5fb98c9e6c70fc61d44191931ea2aa08dc90, nTime=1393221600, nBits=1e0fffff, nNonce=164482, vtx=1, vchBlockSig=)
* Coinbase(hash=12630d16a9, ver=1, nTime=1393221600, vin.size=1, vout.size=1, nLockTime=0)
* CTxIn(COutPoint(0000000000, 4294967295), coinbase 00012a24323020466562203230313420426974636f696e2041544d7320636f6d6520746f20555341)
* CTxOut(empty)
* vMerkleTree: 12630d16a9
*/
const char* pszTimestamp = "20 Feb 2014 Bitcoin ATMs come to USA";
CMutableTransaction txNew;
txNew.nTime = 1393221600;
txNew.vin.resize(1);
txNew.vout.resize(1);
txNew.vin[0].scriptSig = CScript() << 0 << CScriptNum(42) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
txNew.vout[0].SetEmpty();
genesis.vtx.push_back(txNew);
genesis.hashPrevBlock.SetNull();
genesis.nVersion = 1;
genesis.nTime = 1393221600;
genesis.nBits = 0x1e0fffff;
genesis.nNonce = 164482;
genesis.hashMerkleRoot = BlockMerkleRoot(genesis);
genesis = CreateGenesisBlock(1504695029, 17, 0x207fffff, 7, 0);
consensus.hashGenesisBlock = genesis.GetHash();
assert(consensus.hashGenesisBlock == uint256S("0x000001faef25dec4fbcf906e6242621df2c183bf232f263d0ba5b101911e4563"));
assert(consensus.hashGenesisBlock == uint256S("0x0000724595fb3b9609d441cbfb9577615c292abf07d996d3edabc48de843642d"));
assert(genesis.hashMerkleRoot == uint256S("0x12630d16a97f24b287c8c2594dda5fb98c9e6c70fc61d44191931ea2aa08dc90"));
vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds.
vSeeds.clear(); //! Regtest mode doesn't have any DNS seeds.
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,25);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,85);
base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,153);
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,239);
base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x88)(0xB2)(0x1E).convert_to_container<std::vector<unsigned char> >();
base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x88)(0xAD)(0xE4).convert_to_container<std::vector<unsigned char> >();
cashaddrPrefix = "blkreg";
@@ -360,7 +334,7 @@ public:
checkpointData = (CCheckpointData) {
boost::assign::map_list_of
( 0, uint256S("0x000001faef25dec4fbcf906e6242621df2c183bf232f263d0ba5b101911e4563")),
( 0, uint256S("0x0000724595fb3b9609d441cbfb9577615c292abf07d996d3edabc48de843642d")),
0,
0,
0