mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Merge pull request #3434 from lusarz/refactor-bisq-environment-5
Refactor BisqEnvironment - change type of ignoreLocalBtcNode to boolean
This commit is contained in:
commit
415aa105fb
@ -195,7 +195,10 @@ public class BisqEnvironment extends StandardEnvironment {
|
||||
banList, dumpStatistics, maxMemory, socks5ProxyBtcAddress,
|
||||
torRcFile, torRcOptions, externalTorControlPort, externalTorPassword, externalTorCookieFile,
|
||||
socks5ProxyHttpAddress, useAllProvidedNodes, numConnectionForBtc, genesisTxId, genesisBlockHeight, genesisTotalSupply,
|
||||
referralId, daoActivated, msgThrottlePerSec, msgThrottlePer10Sec, sendMsgThrottleTrigger, sendMsgThrottleSleep, ignoreLocalBtcNode;
|
||||
referralId, daoActivated, msgThrottlePerSec, msgThrottlePer10Sec, sendMsgThrottleTrigger, sendMsgThrottleSleep;
|
||||
|
||||
@Getter
|
||||
protected boolean ignoreLocalBtcNode;
|
||||
|
||||
protected final boolean externalTorUseSafeCookieAuthentication, torStreamIsolation;
|
||||
|
||||
@ -264,7 +267,7 @@ public class BisqEnvironment extends StandardEnvironment {
|
||||
userAgent = getProperty(commandLineProperties, BtcOptionKeys.USER_AGENT, "Bisq");
|
||||
useAllProvidedNodes = getProperty(commandLineProperties, BtcOptionKeys.USE_ALL_PROVIDED_NODES, "false");
|
||||
numConnectionForBtc = getProperty(commandLineProperties, BtcOptionKeys.NUM_CONNECTIONS_FOR_BTC, "9");
|
||||
ignoreLocalBtcNode = getProperty(commandLineProperties, BtcOptionKeys.IGNORE_LOCAL_BTC_NODE, "false");
|
||||
ignoreLocalBtcNode = getProperty(commandLineProperties, BtcOptionKeys.IGNORE_LOCAL_BTC_NODE, "false").equalsIgnoreCase("true");
|
||||
|
||||
|
||||
MutablePropertySources propertySources = getPropertySources();
|
||||
@ -344,10 +347,6 @@ public class BisqEnvironment extends StandardEnvironment {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getIgnoreLocalBtcNode() {
|
||||
return ignoreLocalBtcNode.equalsIgnoreCase("true");
|
||||
}
|
||||
|
||||
private Resource getAppDirPropertiesResource() {
|
||||
String location = String.format("file:%s/bisq.properties", appDataDir);
|
||||
return resourceLoader.getResource(location);
|
||||
@ -429,7 +428,7 @@ public class BisqEnvironment extends StandardEnvironment {
|
||||
setProperty(BtcOptionKeys.USER_AGENT, userAgent);
|
||||
setProperty(BtcOptionKeys.USE_ALL_PROVIDED_NODES, useAllProvidedNodes);
|
||||
setProperty(BtcOptionKeys.NUM_CONNECTIONS_FOR_BTC, numConnectionForBtc);
|
||||
setProperty(BtcOptionKeys.IGNORE_LOCAL_BTC_NODE, ignoreLocalBtcNode);
|
||||
setProperty(BtcOptionKeys.IGNORE_LOCAL_BTC_NODE, String.valueOf(ignoreLocalBtcNode));
|
||||
|
||||
setProperty(UserAgent.NAME_KEY, appName);
|
||||
setProperty(UserAgent.VERSION_KEY, Version.VERSION);
|
||||
|
@ -466,7 +466,7 @@ public class BisqSetup {
|
||||
// For DAO testnet we ignore local btc node
|
||||
if (BisqEnvironment.getBaseCurrencyNetwork().isDaoRegTest() ||
|
||||
BisqEnvironment.getBaseCurrencyNetwork().isDaoTestNet() ||
|
||||
bisqEnvironment.getIgnoreLocalBtcNode()) {
|
||||
bisqEnvironment.isIgnoreLocalBtcNode()) {
|
||||
step3();
|
||||
} else {
|
||||
new Thread(() -> {
|
||||
|
Loading…
Reference in New Issue
Block a user