mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Switch testing framework from MAIN to new UNITTEST network
UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
This commit is contained in:
parent
8d132431b4
commit
f0fd00cb77
10 changed files with 97 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue