diff options
author | SergioDemianLerner <Sergio.d.Lerner@gmail.com> | 2014-09-04 16:23:42 -0300 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-10-02 13:51:39 +0200 |
commit | f0fd00cb77d91ec9ac729bc4cf35ff7d9f676d8f (patch) | |
tree | a7c6249b856c74dd8600c8244ea9e8331d74eb6c /src/chainparamsbase.cpp | |
parent | 8d132431b4f6a7676482815231cd923d9047d541 (diff) |
Switch testing framework from MAIN to new UNITTEST network
UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
Diffstat (limited to 'src/chainparamsbase.cpp')
-rw-r--r-- | src/chainparamsbase.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp index 98bb5b855f..e9d63197bd 100644 --- a/src/chainparamsbase.cpp +++ b/src/chainparamsbase.cpp @@ -57,6 +57,20 @@ public: }; static CBaseRegTestParams regTestParams; +// +// Unit test +// +class CBaseUnitTestParams : public CBaseMainParams +{ +public: + CBaseUnitTestParams() + { + networkID = CBaseChainParams::UNITTEST; + strDataDir = "unittest"; + } +}; +static CBaseUnitTestParams unitTestParams; + static CBaseChainParams* pCurrentBaseParams = 0; const CBaseChainParams& BaseParams() @@ -77,6 +91,9 @@ void SelectBaseParams(CBaseChainParams::Network network) case CBaseChainParams::REGTEST: pCurrentBaseParams = ®TestParams; break; + case CBaseChainParams::UNITTEST: + pCurrentBaseParams = &unitTestParams; + break; default: assert(false && "Unimplemented network"); return; |