mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Elements: Remove testnet3
This commit is contained in:
parent
cbb438cccc
commit
28c3d990e6
9 changed files with 9 additions and 134 deletions
|
|
@ -11,14 +11,12 @@
|
|||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
const std::string CBaseChainParams::MAIN = "main";
|
||||
const std::string CBaseChainParams::TESTNET = "test";
|
||||
const std::string CBaseChainParams::REGTEST = "regtest";
|
||||
|
||||
void AppendParamsHelpMessages(std::string& strUsage, bool debugHelp)
|
||||
{
|
||||
strUsage += HelpMessageGroup(_("Chain selection options:"));
|
||||
strUsage += HelpMessageOpt("-chain=<chain>", _("Use the chain <chain> (default: main). Allowed values: main, testnet, regtest"));
|
||||
strUsage += HelpMessageOpt("-testnet", _("Use the test chain"));
|
||||
if (debugHelp) {
|
||||
strUsage += HelpMessageOpt("-regtest", "Enter regression test mode, which uses a special chain in which blocks can be solved instantly. "
|
||||
"This is intended for regression testing tools and app development.");
|
||||
|
|
@ -38,20 +36,6 @@ public:
|
|||
};
|
||||
|
||||
/**
|
||||
* Testnet (v3)
|
||||
*/
|
||||
class CBaseTestNetParams : public CBaseChainParams
|
||||
{
|
||||
public:
|
||||
CBaseTestNetParams()
|
||||
{
|
||||
nRPCPort = 18332;
|
||||
strDataDir = "testnet3";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Regression test
|
||||
*/
|
||||
class CBaseRegTestParams : public CBaseChainParams
|
||||
|
|
@ -76,8 +60,6 @@ CBaseChainParams* CBaseChainParams::Factory(const std::string& chain)
|
|||
{
|
||||
if (chain == CBaseChainParams::MAIN)
|
||||
return new CBaseMainParams();
|
||||
else if (chain == CBaseChainParams::TESTNET)
|
||||
return new CBaseTestNetParams();
|
||||
else if (chain == CBaseChainParams::REGTEST)
|
||||
return new CBaseRegTestParams();
|
||||
else
|
||||
|
|
@ -91,15 +73,10 @@ void SelectBaseParams(const std::string& chain)
|
|||
|
||||
std::string ChainNameFromCommandLine()
|
||||
{
|
||||
bool fRegTest = GetBoolArg("-regtest", false);
|
||||
bool fTestNet = GetBoolArg("-testnet", false);
|
||||
|
||||
if (fTestNet && fRegTest)
|
||||
throw std::runtime_error("Invalid combination of -regtest and -testnet.");
|
||||
if (fRegTest)
|
||||
if (GetBoolArg("-testnet", false))
|
||||
throw std::runtime_error(strprintf("%s: Invalid option -testnet: elements/%s is a testchain too.", __func__, CBaseChainParams::MAIN));
|
||||
if (GetBoolArg("-regtest", false))
|
||||
return CBaseChainParams::REGTEST;
|
||||
if (fTestNet)
|
||||
return CBaseChainParams::TESTNET;
|
||||
return GetArg("-chain", CBaseChainParams::MAIN);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue