aboutsummaryrefslogtreecommitdiff
path: root/src/chainparams.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-03-09 16:04:43 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-03-09 16:06:14 +0100
commit59bd89f11636e90b2d684e8f411d8d7a88622458 (patch)
tree8c01545831dd3ba1701f584adacfbc2a6b992a9b /src/chainparams.cpp
parent8cbe1f4f5870a165be729cabb9b55dcbf0f85e09 (diff)
test: Remove UNITTEST params
UNITTEST parameter are not used by any current tests, and the model (modifyable parameters) is inconvenient when unit-testing. As they are stored in a global structure eevery test would have to (re)set up its own parameters. For consistency it is also better to test with MAIN parameters.
Diffstat (limited to 'src/chainparams.cpp')
-rw-r--r--src/chainparams.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 1fd3b01681..c48ccbc08a 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -281,51 +281,8 @@ public:
};
static CRegTestParams regTestParams;
-/**
- * Unit test
- */
-class CUnitTestParams : public CMainParams, public CModifiableParams {
-public:
- CUnitTestParams() {
- strNetworkID = "unittest";
- nDefaultPort = 18445;
- vFixedSeeds.clear(); //! Unit test mode doesn't have any fixed seeds.
- vSeeds.clear(); //! Unit test mode doesn't have any DNS seeds.
-
- fRequireRPCPassword = false;
- fMiningRequiresPeers = false;
- fDefaultCheckMemPool = true;
- fAllowMinDifficultyBlocks = false;
- fMineBlocksOnDemand = true;
- }
-
- const Checkpoints::CCheckpointData& Checkpoints() const
- {
- // UnitTest share the same checkpoints as MAIN
- return data;
- }
-
- //! Published setters to allow changing values in unit test cases
- virtual void setSubsidyHalvingInterval(int anSubsidyHalvingInterval) { nSubsidyHalvingInterval=anSubsidyHalvingInterval; }
- virtual void setEnforceBlockUpgradeMajority(int anEnforceBlockUpgradeMajority) { nEnforceBlockUpgradeMajority=anEnforceBlockUpgradeMajority; }
- virtual void setRejectBlockOutdatedMajority(int anRejectBlockOutdatedMajority) { nRejectBlockOutdatedMajority=anRejectBlockOutdatedMajority; }
- virtual void setToCheckBlockUpgradeMajority(int anToCheckBlockUpgradeMajority) { nToCheckBlockUpgradeMajority=anToCheckBlockUpgradeMajority; }
- virtual void setDefaultCheckMemPool(bool afDefaultCheckMemPool) { fDefaultCheckMemPool=afDefaultCheckMemPool; }
- virtual void setAllowMinDifficultyBlocks(bool afAllowMinDifficultyBlocks) { fAllowMinDifficultyBlocks=afAllowMinDifficultyBlocks; }
- virtual void setSkipProofOfWorkCheck(bool afSkipProofOfWorkCheck) { fSkipProofOfWorkCheck = afSkipProofOfWorkCheck; }
-};
-static CUnitTestParams unitTestParams;
-
-
static CChainParams *pCurrentParams = 0;
-CModifiableParams *ModifiableParams()
-{
- assert(pCurrentParams);
- assert(pCurrentParams==&unitTestParams);
- return (CModifiableParams*)&unitTestParams;
-}
-
const CChainParams &Params() {
assert(pCurrentParams);
return *pCurrentParams;
@@ -339,8 +296,6 @@ CChainParams &Params(CBaseChainParams::Network network) {
return testNetParams;
case CBaseChainParams::REGTEST:
return regTestParams;
- case CBaseChainParams::UNITTEST:
- return unitTestParams;
default:
assert(false && "Unimplemented network");
return mainParams;