testnet stuff, mostly unused

This commit is contained in:
Duke Leto
2020-12-15 08:29:42 -05:00
parent baac9390af
commit 4377d2868c

View File

@@ -3,6 +3,9 @@
// Copyright (c) 2016-2020 The Hush developers // Copyright (c) 2016-2020 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying // Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
/////////////////////////////////////////////////////////////////////////////////
// We believe in Extreme Privacy and reject surveillance. -- The Hush Developers
/////////////////////////////////////////////////////////////////////////////////
/****************************************************************************** /******************************************************************************
* Copyright © 2014-2019 The SuperNET Developers. * * Copyright © 2014-2019 The SuperNET Developers. *
* * * *
@@ -334,6 +337,7 @@ public:
} }
}; };
static CTestNetParams testNetParams; static CTestNetParams testNetParams;
#define NUNU Consensus::NetworkUpgrade
/** /**
* Regression test * Regression test
@@ -341,6 +345,7 @@ static CTestNetParams testNetParams;
class CRegTestParams : public CChainParams { class CRegTestParams : public CChainParams {
public: public:
CRegTestParams() { CRegTestParams() {
auto ups = consensus.vUpgrades;
strNetworkID = "regtest"; strNetworkID = "regtest";
strCurrencyUnits = "REG"; strCurrencyUnits = "REG";
bip44CoinType = 1; bip44CoinType = 1;
@@ -355,20 +360,16 @@ public:
assert(maxUint/UintToArith256(consensus.powLimit) >= consensus.nPowAveragingWindow); assert(maxUint/UintToArith256(consensus.powLimit) >= consensus.nPowAveragingWindow);
consensus.nPowMaxAdjustDown = 0; // Turn off adjustment down consensus.nPowMaxAdjustDown = 0; // Turn off adjustment down
consensus.nPowMaxAdjustUp = 0; // Turn off adjustment up consensus.nPowMaxAdjustUp = 0; // Turn off adjustment up
consensus.nPowTargetSpacing = 2.5 * 60; consensus.nPowTargetSpacing = 60; // HSC's default to 60 seconds so a theoretical testnet should as well
consensus.nPowAllowMinDifficultyBlocksAfterHeight = 0; consensus.nPowAllowMinDifficultyBlocksAfterHeight = 0;
consensus.vUpgrades[Consensus::BASE_SPROUT].nProtocolVersion = 170002; ups[Consensus::BASE_SPROUT].nProtocolVersion = 170002;
consensus.vUpgrades[Consensus::BASE_SPROUT].nActivationHeight = ups[Consensus::BASE_SPROUT].nActivationHeight = NUNU::ALWAYS_ACTIVE;
Consensus::NetworkUpgrade::ALWAYS_ACTIVE; ups[Consensus::UPGRADE_TESTDUMMY].nProtocolVersion = 170002;
consensus.vUpgrades[Consensus::UPGRADE_TESTDUMMY].nProtocolVersion = 170002; ups[Consensus::UPGRADE_TESTDUMMY].nActivationHeight = NUNU::NO_ACTIVATION_HEIGHT;
consensus.vUpgrades[Consensus::UPGRADE_TESTDUMMY].nActivationHeight = ups[Consensus::UPGRADE_OVERWINTER].nProtocolVersion = 170003;
Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT; ups[Consensus::UPGRADE_OVERWINTER].nActivationHeight = NUNU::NO_ACTIVATION_HEIGHT;
consensus.vUpgrades[Consensus::UPGRADE_OVERWINTER].nProtocolVersion = 170003; ups[Consensus::UPGRADE_SAPLING].nProtocolVersion = 170006;
consensus.vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight = ups[Consensus::UPGRADE_SAPLING].nActivationHeight = NUNU::NO_ACTIVATION_HEIGHT;
Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT;
consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nProtocolVersion = 170006;
consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight =
Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT;
// 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");
@@ -396,7 +397,7 @@ public:
assert(consensus.hashGenesisBlock == uint256S("0x029f11d80ef9765602235e1bc9727e3eb6ba20839319f761fee920d63401e327")); assert(consensus.hashGenesisBlock == uint256S("0x029f11d80ef9765602235e1bc9727e3eb6ba20839319f761fee920d63401e327"));
assert(genesis.hashMerkleRoot == uint256S("0xc4eaa58879081de3c24a7b117ed2b28300e7ec4c4c1dff1d3f1268b7857a4ddb")); assert(genesis.hashMerkleRoot == uint256S("0xc4eaa58879081de3c24a7b117ed2b28300e7ec4c4c1dff1d3f1268b7857a4ddb"));
nDefaultPort = 17779; nDefaultPort = 15420;
nPruneAfterHeight = 1000; nPruneAfterHeight = 1000;
vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds. vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds.