diff options
Diffstat (limited to 'src/chainparams.cpp')
-rw-r--r-- | src/chainparams.cpp | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 31c67715c8..179db5a818 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -115,7 +115,6 @@ public: fAllowMinDifficultyBlocks = false; fRequireStandard = true; fMineBlocksOnDemand = false; - fSkipProofOfWorkCheck = false; } }; static CMainParams mainParams; @@ -215,46 +214,8 @@ public: }; static CRegTestParams regTestParams; -// -// Unit test -// -class CUnitTestParams : public CMainParams, public CModifiableParams { -public: - CUnitTestParams() { - networkID = CBaseChainParams::UNITTEST; - strNetworkID = "unittest"; - nDefaultPort = 18445; - vFixedSeeds.clear(); - vSeeds.clear(); // Regtest mode doesn't have any DNS seeds. - - fRequireRPCPassword = false; - fMiningRequiresPeers = false; - fDefaultCheckMemPool = true; - fAllowMinDifficultyBlocks = false; - fMineBlocksOnDemand = true; - } -public: - // 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; @@ -268,8 +229,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; |