aboutsummaryrefslogtreecommitdiff
path: root/src/chainparamsbase.cpp
diff options
context:
space:
mode:
authorSergioDemianLerner <Sergio.d.Lerner@gmail.com>2014-09-04 16:23:42 -0300
committerWladimir J. van der Laan <laanwj@gmail.com>2014-09-29 13:03:22 +0200
commita25fd6be138ff2bff7e2ad6a1a789db523c0193f (patch)
tree331eae7469995c3a8318df70f1654c7116fd1bd4 /src/chainparamsbase.cpp
parent41150d601df8bbbec9e6f0b7fb4d3fc569692522 (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.cpp17
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 = &regTestParams;
break;
+ case CBaseChainParams::UNITTEST:
+ pCurrentBaseParams = &unitTestParams;
+ break;
default:
assert(false && "Unimplemented network");
return;