Testchains: Generic selection with -chain=<str> in addition of -testnet and -regtest
This commit is contained in:
8 files changed
+17
-14
No files matched your search
+1
-1
@@ -511,7 +511,7 @@ int GuiMain(int argc, char* argv[])
|
||||
// - QSettings() will use the new application name after this, resulting in network-specific settings
|
||||
// - Needs to be done before createOptionsModel
|
||||
|
||||
// Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
|
||||
// Check for -chain, -testnet or -regtest parameter (Params() calls are only valid after this clause)
|
||||
try {
|
||||
node->selectParams(gArgs.GetChainName());
|
||||
} catch(std::exception &e) {
|
||||
|
||||
+2
-2
@@ -588,7 +588,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
|
||||
// Start client minimized
|
||||
QString strArgs = "-min";
|
||||
// Set -testnet /-regtest options
|
||||
strArgs += QString::fromStdString(strprintf(" -testnet=%d -regtest=%d", gArgs.GetBoolArg("-testnet", false), gArgs.GetBoolArg("-regtest", false)));
|
||||
strArgs += QString::fromStdString(strprintf(" -chain=%s", gArgs.GetChainName()));
|
||||
|
||||
// Set the path to the shortcut target
|
||||
psl->SetPath(pszExePath);
|
||||
@@ -683,7 +683,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
|
||||
optionFile << "Name=Bitcoin\n";
|
||||
else
|
||||
optionFile << strprintf("Name=Bitcoin (%s)\n", chain);
|
||||
optionFile << "Exec=" << pszExePath << strprintf(" -min -testnet=%d -regtest=%d\n", gArgs.GetBoolArg("-testnet", false), gArgs.GetBoolArg("-regtest", false));
|
||||
optionFile << "Exec=" << pszExePath << strprintf(" -min -chain=%s\n", chain);
|
||||
optionFile << "Terminal=false\n";
|
||||
optionFile << "Hidden=false\n";
|
||||
optionFile.close();
|
||||
|
||||
Reference in new issue
Block a user