mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Finish moving 'bitcoinRegtestHost' option handling to Config
This commit is contained in:
parent
be97190415
commit
769c62b7b3
@ -63,6 +63,7 @@ public class Config {
|
||||
|
||||
public static final int DEFAULT_INT = Integer.MIN_VALUE;
|
||||
static final String DEFAULT_CONFIG_FILE_NAME = "bisq.properties";
|
||||
public static final String DEFAULT_REGTEST_HOST = "localhost";
|
||||
|
||||
public static File CURRENT_APP_DATA_DIR;
|
||||
|
||||
@ -205,7 +206,7 @@ public class Config {
|
||||
.withRequiredArg()
|
||||
.ofType(String.class)
|
||||
.describedAs("host[:port]")
|
||||
.defaultsTo("localhost");
|
||||
.defaultsTo("");
|
||||
|
||||
ArgumentAcceptingOptionSpec<Boolean> daoActivatedOpt =
|
||||
parser.accepts("daoActivated", "Developer flag. If true it enables dao phase 2 features.")
|
||||
|
@ -18,7 +18,6 @@
|
||||
package bisq.core.app;
|
||||
|
||||
import bisq.core.btc.BtcOptionKeys;
|
||||
import bisq.core.btc.setup.RegTestHost;
|
||||
import bisq.core.btc.setup.WalletsSetup;
|
||||
import bisq.core.btc.wallet.BsqWalletService;
|
||||
import bisq.core.btc.wallet.BtcWalletService;
|
||||
@ -287,11 +286,6 @@ public abstract class BisqExecutable implements GracefulShutDownHandler, BisqSet
|
||||
.ofType(boolean.class);
|
||||
|
||||
//BtcOptionKeys
|
||||
parser.accepts(BtcOptionKeys.REG_TEST_HOST,
|
||||
format("Bitcoin regtest host when using BTC_REGTEST network (default: %s)", RegTestHost.DEFAULT_HOST))
|
||||
.withRequiredArg()
|
||||
.describedAs("host");
|
||||
|
||||
parser.accepts(BtcOptionKeys.IGNORE_LOCAL_BTC_NODE,
|
||||
"If set to true a Bitcoin core node running locally will be ignored")
|
||||
.withRequiredArg();
|
||||
|
@ -66,7 +66,7 @@ public class BitcoinModule extends AppModule {
|
||||
"104.248.31.39" :
|
||||
config.getBaseCurrencyNetwork().isDaoRegTest() ?
|
||||
"134.209.242.206" :
|
||||
RegTestHost.DEFAULT_HOST;
|
||||
Config.DEFAULT_REGTEST_HOST;
|
||||
}
|
||||
|
||||
RegTestHost.HOST = regTestHost;
|
||||
|
@ -24,6 +24,5 @@ public class BtcOptionKeys {
|
||||
public static final String USER_AGENT = "userAgent";
|
||||
public static final String USE_ALL_PROVIDED_NODES = "useAllProvidedNodes"; // We only use onion nodes if tor is enabled. That flag overrides that default behavior.
|
||||
public static final String NUM_CONNECTIONS_FOR_BTC = "numConnectionForBtc";
|
||||
public static final String REG_TEST_HOST = "bitcoinRegtestHost";
|
||||
public static final String IGNORE_LOCAL_BTC_NODE = "ignoreLocalBtcNode";
|
||||
}
|
||||
|
@ -17,13 +17,14 @@
|
||||
|
||||
package bisq.core.btc.setup;
|
||||
|
||||
import bisq.common.config.Config;
|
||||
|
||||
public enum RegTestHost {
|
||||
|
||||
NONE,
|
||||
LOCALHOST,
|
||||
REMOTE_HOST;
|
||||
|
||||
public static final String DEFAULT_HOST = "localhost";
|
||||
public static String HOST = DEFAULT_HOST;
|
||||
public static String HOST = Config.DEFAULT_REGTEST_HOST;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user