mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
[upstream #8994] Testchains: Generic selection with -chain=<str> in addition of -testnet and -regtest
This commit is contained in:
parent
5d4dfc57cd
commit
a73073011e
6 changed files with 8 additions and 7 deletions
|
|
@ -17,6 +17,7 @@ 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. "
|
||||
|
|
@ -98,5 +99,5 @@ std::string ChainNameFromCommandLine()
|
|||
return CBaseChainParams::REGTEST;
|
||||
if (fTestNet)
|
||||
return CBaseChainParams::TESTNET;
|
||||
return CBaseChainParams::MAIN;
|
||||
return GetArg("-chain", CBaseChainParams::MAIN);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue