Set dao activated by default

We still keep the activation code just in case...
We can clean it up in a later release
This commit is contained in:
Manfred Karrer 2019-04-04 17:06:33 -05:00
parent 4e173ac976
commit a6ec41aaeb
No known key found for this signature in database
GPG Key ID: 401250966A6B2C46
3 changed files with 5 additions and 12 deletions

View File

@ -52,10 +52,7 @@ public class DevEnv {
DevEnv.devMode = devMode;
}
private static final boolean DAO_PHASE2_ACTIVATED = false;
private static final boolean DAO_TRADING_ACTIVATED = false;
private static boolean daoActivated = false;
private static boolean daoActivated = true;
public static boolean isDaoActivated() {
return daoActivated;
@ -71,11 +68,7 @@ public class DevEnv {
throw new RuntimeException(msg);
}
public static boolean isDaoPhase2Activated() {
return DAO_PHASE2_ACTIVATED || daoActivated;
}
public static boolean isDaoTradingActivated() {
return DAO_TRADING_ACTIVATED || daoActivated;
return true;
}
}

View File

@ -166,7 +166,7 @@ public class BisqEnvironment extends StandardEnvironment {
// Util to set isDaoActivated to true if either set as program argument or we run testnet or regtest.
// Can be removed once DAO is live.
public static boolean isDaoActivated(Environment environment) {
Boolean daoActivatedFromOptions = environment.getProperty(DaoOptionKeys.DAO_ACTIVATED, Boolean.class, false);
Boolean daoActivatedFromOptions = environment.getProperty(DaoOptionKeys.DAO_ACTIVATED, Boolean.class, true);
BaseCurrencyNetwork baseCurrencyNetwork = BisqEnvironment.getBaseCurrencyNetwork();
return daoActivatedFromOptions || !baseCurrencyNetwork.isMainnet();
}
@ -328,7 +328,7 @@ public class BisqEnvironment extends StandardEnvironment {
"-1";
daoActivated = commandLineProperties.containsProperty(DaoOptionKeys.DAO_ACTIVATED) ?
(String) commandLineProperties.getProperty(DaoOptionKeys.DAO_ACTIVATED) :
"";
"true";
btcNodes = commandLineProperties.containsProperty(BtcOptionKeys.BTC_NODES) ?
(String) commandLineProperties.getProperty(BtcOptionKeys.BTC_NODES) :

View File

@ -570,7 +570,7 @@ public abstract class BisqExecutable implements GracefulShutDownHandler, BisqSet
.withRequiredArg();
parser.accepts(DaoOptionKeys.DAO_ACTIVATED,
format("Developer flag. If true it enables dao phase 2 features. (default: %s)", "false"))
format("Developer flag. If true it enables dao phase 2 features. (default: %s)", "true"))
.withRequiredArg()
.ofType(boolean.class);
}