From 9876207ce27bbf0057c42c140eaba1afcb1e68cb Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Fri, 2 Mar 2018 14:12:31 +0100 Subject: [PATCH] Multiple devnet fixes (#1960) * Add missing help string for -devnet * Remove testnet seeds from devnet * Activate BIP34/65/66 at height 2 instead of 1 Height 1 is the genesis block and not the devnet genesis block. The genesis block is still at version 1, resulting in re-indexing to fail. --- src/chainparams.cpp | 10 +++------- src/chainparamsbase.cpp | 1 + 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index bf00a88c30..66280f8b3f 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -412,9 +412,9 @@ public: consensus.nGovernanceMinQuorum = 1; consensus.nGovernanceFilterElements = 500; consensus.nMasternodeMinimumConfirmations = 1; - consensus.BIP34Height = 1; // BIP34 activated immediately on devnet (BIP34Hash is set later for the devnet genesis block) - consensus.BIP65Height = 1; // BIP65 activated immediately on devnet - consensus.BIP66Height = 1; // BIP66 activated immediately on devnet + consensus.BIP34Height = 2; // BIP34 activated immediately on devnet + consensus.BIP65Height = 2; // BIP65 activated immediately on devnet + consensus.BIP66Height = 2; // BIP66 activated immediately on devnet consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); consensus.nPowTargetTimespan = 24 * 60 * 60; // Dash: 1 day consensus.nPowTargetSpacing = 2.5 * 60; // Dash: 2.5 minutes @@ -470,8 +470,6 @@ public: devnetGenesis = FindDevNetGenesisBlock(consensus, genesis, 50 * COIN); consensus.hashDevnetGenesisBlock = devnetGenesis.GetHash(); - consensus.BIP34Hash = devnetGenesis.GetHash(); - vFixedSeeds.clear(); vSeeds.clear(); //vSeeds.push_back(CDNSSeedData("dashevo.org", "devnet-seed.dashevo.org")); @@ -490,8 +488,6 @@ public: // Testnet Dash BIP44 coin type is '1' (All coin's testnet default) nExtCoinType = 1; - vFixedSeeds = std::vector(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test)); - fMiningRequiresPeers = true; fDefaultConsistencyChecks = false; fRequireStandard = false; diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp index fab27a4b11..6f07818c5a 100644 --- a/src/chainparamsbase.cpp +++ b/src/chainparamsbase.cpp @@ -19,6 +19,7 @@ void AppendParamsHelpMessages(std::string& strUsage, bool debugHelp) { strUsage += HelpMessageGroup(_("Chain selection options:")); strUsage += HelpMessageOpt("-testnet", _("Use the test chain")); + strUsage += HelpMessageOpt("-devnet=", _("Use devnet chain with provided name")); if (debugHelp) { strUsage += HelpMessageOpt("-regtest", "Enter regression test mode, which uses a special chain in which blocks can be solved instantly. " "This is intended for regression testing tools and app development.");