diff --git a/common/src/main/java/bisq/common/config/Config.java b/common/src/main/java/bisq/common/config/Config.java index 34928a1019e..d58780580f7 100644 --- a/common/src/main/java/bisq/common/config/Config.java +++ b/common/src/main/java/bisq/common/config/Config.java @@ -392,7 +392,8 @@ public Config(String defaultAppName, File defaultUserDataDir, String... args) { .describedAs("host:port[,...]"); ArgumentAcceptingOptionSpec useLocalhostForP2POpt = - parser.accepts(USE_LOCALHOST_FOR_P2P, "Use localhost P2P network for development") + parser.accepts(USE_LOCALHOST_FOR_P2P, "Use localhost P2P network for development. Only available for non-BTC_MAINNET configuration.") + .availableIf(BASE_CURRENCY_NETWORK) .withRequiredArg() .ofType(boolean.class) .defaultsTo(false); @@ -687,7 +688,7 @@ public Config(String defaultAppName, File defaultUserDataDir, String... args) { this.providers = options.valuesOf(providersOpt); this.seedNodes = options.valuesOf(seedNodesOpt); this.banList = options.valuesOf(banListOpt); - this.useLocalhostForP2P = options.valueOf(useLocalhostForP2POpt); + this.useLocalhostForP2P = this.baseCurrencyNetwork.isMainnet() ? false : options.valueOf(useLocalhostForP2POpt); this.maxConnections = options.valueOf(maxConnectionsOpt); this.socks5ProxyBtcAddress = options.valueOf(socks5ProxyBtcAddressOpt); this.socks5ProxyHttpAddress = options.valueOf(socks5ProxyHttpAddressOpt);