From 59bd89f11636e90b2d684e8f411d8d7a88622458 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 9 Mar 2015 16:04:43 +0100 Subject: 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. --- src/chainparams.h | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/chainparams.h') diff --git a/src/chainparams.h b/src/chainparams.h index 78b575d8f3..48b1383a67 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -108,25 +108,6 @@ protected: bool fTestnetToBeDeprecatedFieldRPC; }; -/** - * Modifiable parameters interface is used by test cases to adapt the parameters in order - * to test specific features more easily. Test cases should always restore the previous - * values after finalization. - */ - -class CModifiableParams { -public: - //! Published setters to allow changing values in unit test cases - virtual void setSubsidyHalvingInterval(int anSubsidyHalvingInterval) =0; - virtual void setEnforceBlockUpgradeMajority(int anEnforceBlockUpgradeMajority)=0; - virtual void setRejectBlockOutdatedMajority(int anRejectBlockOutdatedMajority)=0; - virtual void setToCheckBlockUpgradeMajority(int anToCheckBlockUpgradeMajority)=0; - virtual void setDefaultCheckMemPool(bool aDefaultCheckMemPool)=0; - virtual void setAllowMinDifficultyBlocks(bool aAllowMinDifficultyBlocks)=0; - virtual void setSkipProofOfWorkCheck(bool aSkipProofOfWorkCheck)=0; -}; - - /** * Return the currently selected parameters. This won't change after app startup * outside of the unit tests. @@ -136,9 +117,6 @@ const CChainParams &Params(); /** Return parameters for the given network. */ CChainParams &Params(CBaseChainParams::Network network); -/** Get modifiable network parameters (UNITTEST only) */ -CModifiableParams *ModifiableParams(); - /** Sets the params returned by Params() to those for the given network. */ void SelectParams(CBaseChainParams::Network network); -- cgit v1.2.3