Commit d70e161f authored by Aviator's avatar Aviator 💬

Enforce Testnet if PreRelease is True

toggle bit in configure.ac
parent 9192ef61
......@@ -4,7 +4,7 @@ define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 2)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_CLIENT_VERSION_IS_RELEASE, false)
define(_COPYRIGHT_YEAR, 2019)
AC_INIT([Merge Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[www.projectmerge.org],[merge])
AC_CONFIG_SRCDIR([src/main.cpp])
......
......@@ -104,6 +104,10 @@ CBaseChainParams::Network NetworkIdFromCommandLine()
bool fRegTest = GetBoolArg("-regtest", false);
bool fTestNet = GetBoolArg("-testnet", false);
//If this Version is not intended to be released run on Testnet
if(!bClientVersionIsRelease)
return CBaseChainParams::TESTNET;
if (fTestNet && fRegTest)
return CBaseChainParams::MAX_NETWORK_TYPES;
if (fRegTest)
......
......@@ -5,6 +5,12 @@
#ifndef BITCOIN_CHAINPARAMSBASE_H
#define BITCOIN_CHAINPARAMSBASE_H
#if defined(HAVE_CONFIG_H)
#include "config/merge-config.h"
#else
#define CLIENT_VERSION_IS_RELEASE false
#endif
#include <string>
#include <vector>
......@@ -12,6 +18,8 @@
* CBaseChainParams defines the base parameters (shared between merge-cli and merged)
* of a given instance of The Merge system.
*/
static const bool bClientVersionIsRelease = CLIENT_VERSION_IS_RELEASE;
class CBaseChainParams
{
public:
......
......@@ -20,7 +20,7 @@
#define CLIENT_VERSION_BUILD 0
//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
#define CLIENT_VERSION_IS_RELEASE false
/**
* Copyright year (2009-this)
......
......@@ -4416,8 +4416,11 @@ string GetWarnings(string strFor)
string strRPC;
if (!CLIENT_VERSION_IS_RELEASE)
strStatusBar = _("This is a pre-release test build - use at your own risk - do not use for staking or merchant applications!");
{
strStatusBar = _("This is a pre-release test build - use at your own risk - do not use for staking or merchant applications!");
strStatusBar += "\n\n";
strStatusBar += _("This version will only run on TESTNET");
}
if (GetBoolArg("-testsafemode", false))
strStatusBar = strRPC = "testsafemode enabled";
......
......@@ -26,7 +26,7 @@
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop:0 #F0D0A0, stop:1 #F8D488); color:#000000;</string>
<string notr="true">background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop:0 #f90e0e, stop:1 #d84e4e); color:#000000;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
......
......@@ -4357,6 +4357,10 @@ For eksempel: alertnotify=Echo %% | mail - s "MERGE ALARM!" e-mail@administrator
<source>This is a pre-release test build - use at your own risk - do not use for staking or merchant applications!</source>
<translation>Denne release er en testrelease. Anvendelse på eget ansvar - bør ikke anvendes til staking eller handelsapplikationer!</translation>
</message>
<message>
<source>This version will only run on TESTNET</source>
<translation>This version will only run on TESTNET</translation>
</message>
<message>
<source>&lt;category&gt; can be:</source>
<translation>&lt;category&gt; can be:</translation>
......
......@@ -4849,6 +4849,10 @@ Beispiel: alertnotify=echo %%s | mail -s "MERGE Alert" admin@foo.com
<source>This is a pre-release test build - use at your own risk - do not use for staking or merchant applications!</source>
<translation>Dies ist ein Pre-Release-Testbuild - Nutzung auf eigene Gefahr - Nutzen Sie diese Version nicht für Staking oder Handelsanwendungen.</translation>
</message>
<message>
<source>This version will only run on TESTNET</source>
<translation>Diese Version wird nur das TESTNET benutzen</translation>
</message>
<message>
<source> mints deleted
</source>
......
......@@ -6807,6 +6807,10 @@ for example: alertnotify=echo %%s | mail -s &quot;MERGE Alert&quot; admin@foo.co
<source>This is a pre-release test build - use at your own risk - do not use for staking or merchant applications!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This version will only run on TESTNET</source>
<translation>This version will only run on TESTNET</translation>
</message>
<message>
<location line="-152"/>
<source> mints deleted
......
......@@ -4533,6 +4533,10 @@ for example: alertnotify=echo %%s | mail -s "MERGE Alert" admin@foo.com
<source>This is a pre-release test build - use at your own risk - do not use for staking or merchant applications!</source>
<translation>This is a pre-release test build - use at your own risk - do not use for staking or merchant applications!</translation>
</message>
<message>
<source>This version will only run on TESTNET</source>
<translation>This version will only run on TESTNET</translation>
</message>
<message>
<source>&lt;category&gt; can be:</source>
<translation>&lt;category&gt; can be:</translation>
......
......@@ -4914,6 +4914,10 @@ por ejemplo: alertnotify=echo %%s | mail -s "MERGE Alert" admin@foo.com
<source>This is a pre-release test build - use at your own risk - do not use for staking or merchant applications!</source>
<translation>Esto es una versión pre-release de prueba - use bajo su propia responsabilidad - ¡No lo utilice para recompensa de participación ni aplicaciones de comercio!</translation>
</message>
<message>
<source>This version will only run on TESTNET</source>
<translation>This version will only run on TESTNET</translation>
</message>
<message>
<source> mints deleted
</source>
......
......@@ -5090,6 +5090,10 @@ rpcpassword=%s
<source>This is a pre-release test build - use at your own risk - do not use for staking or merchant applications!</source>
<translation>이것은 사전 릴리스 테스트 빌드입니다 - 사용상 책임은 귀하에게 있습니다. - staking이나 상업적인 용도로는 절대 사용하지 마십시오!</translation>
</message>
<message>
<source>This version will only run on TESTNET</source>
<translation>This version will only run on TESTNET</translation>
</message>
<message>
<source> mints deleted
</source>
......
......@@ -4898,6 +4898,10 @@ bijvoorbeeld: alertnotify = echo %%s | mail -s "MERGE Alert" admin@foo.com
<source>This is a pre-release test build - use at your own risk - do not use for staking or merchant applications!</source>
<translation>Dit is een pre-release test build - gebruik op eigen risico - niet gebruiken voor staking of handel applicaties!</translation>
</message>
<message>
<source>This version will only run on TESTNET</source>
<translation>This version will only run on TESTNET</translation>
</message>
<message>
<source> mints deleted
</source>
......
......@@ -1611,6 +1611,10 @@ Address: %4
<source>This is a pre-release test build - use at your own risk - do not use for staking or merchant applications!</source>
<translation>这是一个预发行测试版本 - 您自己承担风险 - 不要用于商业应用!</translation>
</message>
<message>
<source>This version will only run on TESTNET</source>
<translation>This version will only run on TESTNET</translation>
</message>
<message>
<source>Specify your own public address</source>
<translation>指定您自己的公共地址</translation>
......
......@@ -165,6 +165,8 @@ QT_TRANSLATE_NOOP("MERGE-core", ""
"This is a pre-release test build - use at your own risk - do not use for "
"staking or merchant applications!"),
QT_TRANSLATE_NOOP("MERGE-core", ""
"This version will only run on TESTNET"),
QT_TRANSLATE_NOOP("MERGE-core", ""
"This product includes software developed by the OpenSSL Project for use in "
"the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software "
"written by Eric Young and UPnP software written by Thomas Bernard."),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment