mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-23 22:39:33 -05:00
manage monero connections from ui #623
use tor for all monero connections by default renames from btc to xmr updated translations
This commit is contained in:
parent
1faedc8121
commit
06be2a4829
@ -58,7 +58,7 @@ public class Config {
|
||||
public static final String CONFIG_FILE = "configFile";
|
||||
public static final String MAX_MEMORY = "maxMemory";
|
||||
public static final String LOG_LEVEL = "logLevel";
|
||||
public static final String BANNED_BTC_NODES = "bannedBtcNodes";
|
||||
public static final String BANNED_XMR_NODES = "bannedXmrNodes";
|
||||
public static final String BANNED_PRICE_RELAY_NODES = "bannedPriceRelayNodes";
|
||||
public static final String BANNED_SEED_NODES = "bannedSeedNodes";
|
||||
public static final String BASE_CURRENCY_NETWORK = "baseCurrencyNetwork";
|
||||
@ -81,7 +81,7 @@ public class Config {
|
||||
public static final String MAX_CONNECTIONS = "maxConnections";
|
||||
public static final String SOCKS_5_PROXY_BTC_ADDRESS = "socks5ProxyBtcAddress";
|
||||
public static final String SOCKS_5_PROXY_HTTP_ADDRESS = "socks5ProxyHttpAddress";
|
||||
public static final String USE_TOR_FOR_BTC = "useTorForBtc";
|
||||
public static final String USE_TOR_FOR_XMR = "useTorForXmr";
|
||||
public static final String TORRC_FILE = "torrcFile";
|
||||
public static final String TORRC_OPTIONS = "torrcOptions";
|
||||
public static final String TOR_CONTROL_PORT = "torControlPort";
|
||||
@ -93,12 +93,12 @@ public class Config {
|
||||
public static final String MSG_THROTTLE_PER_10_SEC = "msgThrottlePer10Sec";
|
||||
public static final String SEND_MSG_THROTTLE_TRIGGER = "sendMsgThrottleTrigger";
|
||||
public static final String SEND_MSG_THROTTLE_SLEEP = "sendMsgThrottleSleep";
|
||||
public static final String IGNORE_LOCAL_BTC_NODE = "ignoreLocalBtcNode";
|
||||
public static final String IGNORE_LOCAL_XMR_NODE = "ignoreLocalXmrNode";
|
||||
public static final String BITCOIN_REGTEST_HOST = "bitcoinRegtestHost";
|
||||
public static final String XMR_NODE = "xmrNode";
|
||||
public static final String XMR_NODE_USERNAME = "xmrNodeUsername";
|
||||
public static final String XMR_NODE_PASSWORD = "xmrNodePassword";
|
||||
public static final String BTC_NODES = "btcNodes";
|
||||
public static final String XMR_NODES = "xmrNodes";
|
||||
public static final String SOCKS5_DISCOVER_MODE = "socks5DiscoverMode";
|
||||
public static final String USE_ALL_PROVIDED_NODES = "useAllProvidedNodes";
|
||||
public static final String USER_AGENT = "userAgent";
|
||||
@ -145,12 +145,12 @@ public class Config {
|
||||
public final int nodePort;
|
||||
public final int maxMemory;
|
||||
public final String logLevel;
|
||||
public final List<String> bannedBtcNodes;
|
||||
public final List<String> bannedXmrNodes;
|
||||
public final List<String> bannedPriceRelayNodes;
|
||||
public final List<String> bannedSeedNodes;
|
||||
public final BaseCurrencyNetwork baseCurrencyNetwork;
|
||||
public final NetworkParameters networkParameters;
|
||||
public final boolean ignoreLocalBtcNode;
|
||||
public final boolean ignoreLocalXmrNode;
|
||||
public final String bitcoinRegtestHost;
|
||||
public final String referralId;
|
||||
public final boolean useDevMode;
|
||||
@ -179,9 +179,9 @@ public class Config {
|
||||
public final String xmrNode;
|
||||
public final String xmrNodeUsername;
|
||||
public final String xmrNodePassword;
|
||||
public final String btcNodes;
|
||||
public final boolean useTorForBtc;
|
||||
public final boolean useTorForBtcOptionSetExplicitly;
|
||||
public final String xmrNodes;
|
||||
public final boolean useTorForXmr;
|
||||
public final boolean useTorForXmrOptionSetExplicitly;
|
||||
public final String socks5DiscoverMode;
|
||||
public final boolean useAllProvidedNodes;
|
||||
public final String userAgent;
|
||||
@ -295,8 +295,8 @@ public class Config {
|
||||
.describedAs("OFF|ALL|ERROR|WARN|INFO|DEBUG|TRACE")
|
||||
.defaultsTo(Level.INFO.levelStr);
|
||||
|
||||
ArgumentAcceptingOptionSpec<String> bannedBtcNodesOpt =
|
||||
parser.accepts(BANNED_BTC_NODES, "List Bitcoin nodes to ban")
|
||||
ArgumentAcceptingOptionSpec<String> bannedXmrNodesOpt =
|
||||
parser.accepts(BANNED_XMR_NODES, "List Bitcoin nodes to ban")
|
||||
.withRequiredArg()
|
||||
.ofType(String.class)
|
||||
.withValuesSeparatedBy(',')
|
||||
@ -324,8 +324,8 @@ public class Config {
|
||||
.withValuesConvertedBy(new EnumValueConverter(BaseCurrencyNetwork.class))
|
||||
.defaultsTo(BaseCurrencyNetwork.XMR_MAINNET);
|
||||
|
||||
ArgumentAcceptingOptionSpec<Boolean> ignoreLocalBtcNodeOpt = // TODO: update this to ignore local XMR node
|
||||
parser.accepts(IGNORE_LOCAL_BTC_NODE,
|
||||
ArgumentAcceptingOptionSpec<Boolean> ignoreLocalXmrNodeOpt = // TODO: update this to ignore local XMR node
|
||||
parser.accepts(IGNORE_LOCAL_XMR_NODE,
|
||||
"If set to true a Monero node running locally will be ignored")
|
||||
.withRequiredArg()
|
||||
.ofType(Boolean.class)
|
||||
@ -513,14 +513,14 @@ public class Config {
|
||||
.withRequiredArg()
|
||||
.defaultsTo("");
|
||||
|
||||
ArgumentAcceptingOptionSpec<String> btcNodesOpt =
|
||||
parser.accepts(BTC_NODES, "Custom nodes used for BitcoinJ as comma separated IP addresses.")
|
||||
ArgumentAcceptingOptionSpec<String> xmrNodesOpt =
|
||||
parser.accepts(XMR_NODES, "Custom nodes used for BitcoinJ as comma separated IP addresses.")
|
||||
.withRequiredArg()
|
||||
.describedAs("ip[,...]")
|
||||
.defaultsTo("");
|
||||
|
||||
ArgumentAcceptingOptionSpec<Boolean> useTorForBtcOpt =
|
||||
parser.accepts(USE_TOR_FOR_BTC, "If set to true BitcoinJ is routed over tor (socks 5 proxy).")
|
||||
ArgumentAcceptingOptionSpec<Boolean> useTorForXmrOpt =
|
||||
parser.accepts(USE_TOR_FOR_XMR, "If set to true BitcoinJ is routed over tor (socks 5 proxy).")
|
||||
.withRequiredArg()
|
||||
.ofType(Boolean.class)
|
||||
.defaultsTo(false);
|
||||
@ -650,12 +650,12 @@ public class Config {
|
||||
this.walletRpcBindPort = options.valueOf(walletRpcBindPortOpt);
|
||||
this.maxMemory = options.valueOf(maxMemoryOpt);
|
||||
this.logLevel = options.valueOf(logLevelOpt);
|
||||
this.bannedBtcNodes = options.valuesOf(bannedBtcNodesOpt);
|
||||
this.bannedXmrNodes = options.valuesOf(bannedXmrNodesOpt);
|
||||
this.bannedPriceRelayNodes = options.valuesOf(bannedPriceRelayNodesOpt);
|
||||
this.bannedSeedNodes = options.valuesOf(bannedSeedNodesOpt);
|
||||
this.baseCurrencyNetwork = (BaseCurrencyNetwork) options.valueOf(baseCurrencyNetworkOpt);
|
||||
this.networkParameters = baseCurrencyNetwork.getParameters();
|
||||
this.ignoreLocalBtcNode = options.valueOf(ignoreLocalBtcNodeOpt);
|
||||
this.ignoreLocalXmrNode = options.valueOf(ignoreLocalXmrNodeOpt);
|
||||
this.bitcoinRegtestHost = options.valueOf(bitcoinRegtestHostOpt);
|
||||
this.torrcFile = options.has(torrcFileOpt) ? options.valueOf(torrcFileOpt).toFile() : null;
|
||||
this.torrcOptions = options.valueOf(torrcOptionsOpt);
|
||||
@ -685,9 +685,9 @@ public class Config {
|
||||
this.xmrNode = options.valueOf(xmrNodeOpt);
|
||||
this.xmrNodeUsername = options.valueOf(xmrNodeUsernameOpt);
|
||||
this.xmrNodePassword = options.valueOf(xmrNodePasswordOpt);
|
||||
this.btcNodes = options.valueOf(btcNodesOpt);
|
||||
this.useTorForBtc = options.valueOf(useTorForBtcOpt);
|
||||
this.useTorForBtcOptionSetExplicitly = options.has(useTorForBtcOpt);
|
||||
this.xmrNodes = options.valueOf(xmrNodesOpt);
|
||||
this.useTorForXmr = options.valueOf(useTorForXmrOpt);
|
||||
this.useTorForXmrOptionSetExplicitly = options.has(useTorForXmrOpt);
|
||||
this.socks5DiscoverMode = options.valueOf(socks5DiscoverModeOpt);
|
||||
this.useAllProvidedNodes = options.valueOf(useAllProvidedNodesOpt);
|
||||
this.userAgent = options.valueOf(userAgentOpt);
|
||||
|
@ -13,7 +13,7 @@ import java.nio.file.Path;
|
||||
|
||||
import static haveno.common.config.Config.APP_DATA_DIR;
|
||||
import static haveno.common.config.Config.APP_NAME;
|
||||
import static haveno.common.config.Config.BANNED_BTC_NODES;
|
||||
import static haveno.common.config.Config.BANNED_XMR_NODES;
|
||||
import static haveno.common.config.Config.CONFIG_FILE;
|
||||
import static haveno.common.config.Config.DEFAULT_CONFIG_FILE_NAME;
|
||||
import static haveno.common.config.Config.HELP;
|
||||
@ -200,9 +200,9 @@ public class ConfigTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenBannedBtcNodesOptionIsSet_thenBannedBtcNodesPropertyReturnsItsValue() {
|
||||
Config config = configWithOpts(opt(BANNED_BTC_NODES, "foo.onion:8333,bar.onion:8333"));
|
||||
assertThat(config.bannedBtcNodes, contains("foo.onion:8333", "bar.onion:8333"));
|
||||
public void whenBannedXmrNodesOptionIsSet_thenBannedXmrNodesPropertyReturnsItsValue() {
|
||||
Config config = configWithOpts(opt(BANNED_XMR_NODES, "foo.onion:8333,bar.onion:8333"));
|
||||
assertThat(config.bannedXmrNodes, contains("foo.onion:8333", "bar.onion:8333"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -1,10 +1,13 @@
|
||||
package haveno.core.api;
|
||||
|
||||
import haveno.common.app.DevEnv;
|
||||
import haveno.common.config.BaseCurrencyNetwork;
|
||||
import haveno.common.config.Config;
|
||||
import haveno.core.trade.HavenoUtils;
|
||||
import haveno.core.user.Preferences;
|
||||
import haveno.core.xmr.model.EncryptedConnectionList;
|
||||
import haveno.core.xmr.nodes.XmrNodes;
|
||||
import haveno.core.xmr.nodes.XmrNodesSetupPreferences;
|
||||
import haveno.core.xmr.nodes.XmrNodes.XmrNode;
|
||||
import haveno.core.xmr.setup.DownloadListener;
|
||||
import haveno.core.xmr.setup.WalletsSetup;
|
||||
import haveno.network.Socks5ProxyProvider;
|
||||
@ -32,10 +35,7 @@ import monero.daemon.model.MoneroPeer;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -50,38 +50,14 @@ public final class CoreMoneroConnectionsService {
|
||||
private static final long MIN_ERROR_LOG_PERIOD_MS = 300000; // minimum period between logging errors fetching daemon info
|
||||
private static Long lastErrorTimestamp;
|
||||
|
||||
// default Monero nodes
|
||||
private static final Map<BaseCurrencyNetwork, List<MoneroRpcConnection>> DEFAULT_CONNECTIONS;
|
||||
static {
|
||||
DEFAULT_CONNECTIONS = new HashMap<BaseCurrencyNetwork, List<MoneroRpcConnection>>();
|
||||
DEFAULT_CONNECTIONS.put(BaseCurrencyNetwork.XMR_LOCAL, Arrays.asList(
|
||||
new MoneroRpcConnection("http://127.0.0.1:28081").setPriority(1)
|
||||
));
|
||||
DEFAULT_CONNECTIONS.put(BaseCurrencyNetwork.XMR_STAGENET, Arrays.asList(
|
||||
new MoneroRpcConnection("http://127.0.0.1:38081").setPriority(1), // localhost is first priority, use loopback address 127.0.0.1 to match url used by local node service
|
||||
new MoneroRpcConnection("http://127.0.0.1:39081").setPriority(2), // from makefile: `monerod-stagenet-custom`
|
||||
new MoneroRpcConnection("http://45.63.8.26:38081").setPriority(2), // hosted by haveno
|
||||
new MoneroRpcConnection("http://stagenet.community.rino.io:38081").setPriority(2),
|
||||
new MoneroRpcConnection("http://stagenet.melo.tools:38081").setPriority(2),
|
||||
new MoneroRpcConnection("http://node.sethforprivacy.com:38089").setPriority(2),
|
||||
new MoneroRpcConnection("http://node2.sethforprivacy.com:38089").setPriority(2),
|
||||
new MoneroRpcConnection("http://plowsof3t5hogddwabaeiyrno25efmzfxyro2vligremt7sxpsclfaid.onion:38089").setPriority(2)
|
||||
));
|
||||
DEFAULT_CONNECTIONS.put(BaseCurrencyNetwork.XMR_MAINNET, Arrays.asList(
|
||||
new MoneroRpcConnection("http://127.0.0.1:18081").setPriority(1),
|
||||
new MoneroRpcConnection("http://node.community.rino.io:18081").setPriority(2),
|
||||
new MoneroRpcConnection("http://xmr-node.cakewallet.com:18081").setPriority(2),
|
||||
new MoneroRpcConnection("http://xmr-node-eu.cakewallet.com:18081").setPriority(2),
|
||||
new MoneroRpcConnection("http://xmr-node-usa-east.cakewallet.com:18081").setPriority(2),
|
||||
new MoneroRpcConnection("http://xmr-node-uk.cakewallet.com:18081").setPriority(2),
|
||||
new MoneroRpcConnection("http://node.sethforprivacy.com:18089").setPriority(2)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
private final Object lock = new Object();
|
||||
private final Config config;
|
||||
private final CoreContext coreContext;
|
||||
private final Preferences preferences;
|
||||
private final CoreAccountService accountService;
|
||||
private final XmrNodes xmrNodes;
|
||||
private final CoreMoneroNodeService nodeService;
|
||||
private final MoneroConnectionManager connectionManager;
|
||||
private final EncryptedConnectionList connectionList;
|
||||
@ -103,15 +79,19 @@ public final class CoreMoneroConnectionsService {
|
||||
public CoreMoneroConnectionsService(P2PService p2PService,
|
||||
Config config,
|
||||
CoreContext coreContext,
|
||||
Preferences preferences,
|
||||
WalletsSetup walletsSetup,
|
||||
CoreAccountService accountService,
|
||||
XmrNodes xmrNodes,
|
||||
CoreMoneroNodeService nodeService,
|
||||
MoneroConnectionManager connectionManager,
|
||||
EncryptedConnectionList connectionList,
|
||||
Socks5ProxyProvider socks5ProxyProvider) {
|
||||
this.config = config;
|
||||
this.coreContext = coreContext;
|
||||
this.preferences = preferences;
|
||||
this.accountService = accountService;
|
||||
this.xmrNodes = xmrNodes;
|
||||
this.nodeService = nodeService;
|
||||
this.connectionManager = connectionManager;
|
||||
this.connectionList = connectionList;
|
||||
@ -178,7 +158,7 @@ public final class CoreMoneroConnectionsService {
|
||||
public void addConnection(MoneroRpcConnection connection) {
|
||||
synchronized (lock) {
|
||||
accountService.checkAccountOpen();
|
||||
connectionList.addConnection(connection);
|
||||
if (coreContext.isApiUser()) connectionList.addConnection(connection);
|
||||
connectionManager.addConnection(connection);
|
||||
}
|
||||
}
|
||||
@ -342,7 +322,7 @@ public final class CoreMoneroConnectionsService {
|
||||
if (isConnectionLocal()) {
|
||||
if (lastInfo != null && (lastInfo.isBusySyncing() || (lastInfo.getHeightWithoutBootstrap() != null && lastInfo.getHeightWithoutBootstrap() > 0 && lastInfo.getHeightWithoutBootstrap() < lastInfo.getHeight()))) return REFRESH_PERIOD_HTTP_MS; // refresh slower if syncing or bootstrapped
|
||||
else return REFRESH_PERIOD_LOCAL_MS; // TODO: announce faster refresh after done syncing
|
||||
} else if (getConnection().isOnion()) {
|
||||
} else if (useProxy(getConnection())) {
|
||||
return REFRESH_PERIOD_ONION_MS;
|
||||
} else {
|
||||
return REFRESH_PERIOD_HTTP_MS;
|
||||
@ -350,6 +330,10 @@ public final class CoreMoneroConnectionsService {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean useProxy(MoneroRpcConnection connection) {
|
||||
return connection.isOnion() || (preferences.isUseTorForMonero() && !HavenoUtils.isLocalHost(connection.getUri()));
|
||||
}
|
||||
|
||||
private void initialize() {
|
||||
|
||||
// initialize connections
|
||||
@ -384,35 +368,61 @@ public final class CoreMoneroConnectionsService {
|
||||
connectionManager.reset();
|
||||
connectionManager.setTimeout(REFRESH_PERIOD_HTTP_MS);
|
||||
|
||||
// load connections
|
||||
log.info("TOR proxy URI: " + getProxyUri());
|
||||
for (MoneroRpcConnection connection : connectionList.getConnections()) {
|
||||
if (connection.isOnion()) connection.setProxyUri(getProxyUri());
|
||||
connectionManager.addConnection(connection);
|
||||
}
|
||||
log.info("Read " + connectionList.getConnections().size() + " connections from disk");
|
||||
// load previous or default connections
|
||||
if (coreContext.isApiUser()) {
|
||||
|
||||
// add default connections
|
||||
for (MoneroRpcConnection connection : DEFAULT_CONNECTIONS.get(Config.baseCurrencyNetwork())) {
|
||||
if (connectionList.hasConnection(connection.getUri())) continue;
|
||||
if (connection.isOnion()) connection.setProxyUri(getProxyUri());
|
||||
addConnection(connection);
|
||||
// load previous connections
|
||||
for (MoneroRpcConnection connection : connectionList.getConnections()) connectionManager.addConnection(connection);
|
||||
log.info("Read " + connectionList.getConnections().size() + " previous connections from disk");
|
||||
|
||||
// add default connections
|
||||
for (XmrNode node : xmrNodes.getAllXmrNodes()) {
|
||||
if (node.hasClearNetAddress()) {
|
||||
MoneroRpcConnection connection = new MoneroRpcConnection(node.getAddress() + ":" + node.getPort()).setPriority(node.getPriority());
|
||||
if (!connectionList.hasConnection(connection.getUri())) addConnection(connection);
|
||||
}
|
||||
if (node.hasOnionAddress()) {
|
||||
MoneroRpcConnection connection = new MoneroRpcConnection(node.getOnionAddress() + ":" + node.getPort()).setPriority(node.getPriority());
|
||||
if (!connectionList.hasConnection(connection.getUri())) addConnection(connection);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
// add default connections
|
||||
for (XmrNode node : xmrNodes.selectPreferredNodes(new XmrNodesSetupPreferences(preferences))) {
|
||||
if (node.hasClearNetAddress()) {
|
||||
MoneroRpcConnection connection = new MoneroRpcConnection(node.getAddress() + ":" + node.getPort()).setPriority(node.getPriority());
|
||||
addConnection(connection);
|
||||
}
|
||||
if (node.hasOnionAddress()) {
|
||||
MoneroRpcConnection connection = new MoneroRpcConnection(node.getOnionAddress() + ":" + node.getPort()).setPriority(node.getPriority());
|
||||
addConnection(connection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// restore last used connection if unconfigured and present
|
||||
Optional<String> currentConnectionUri = null;
|
||||
// set current connection
|
||||
Optional<String> currentConnectionUri = Optional.empty();
|
||||
if ("".equals(config.xmrNode)) {
|
||||
currentConnectionUri = connectionList.getCurrentConnectionUri();
|
||||
if (currentConnectionUri.isPresent()) connectionManager.setConnection(currentConnectionUri.get());
|
||||
if (coreContext.isApiUser() && connectionList.getCurrentConnectionUri().isPresent()) {
|
||||
currentConnectionUri = connectionList.getCurrentConnectionUri();
|
||||
connectionManager.setConnection(currentConnectionUri.get());
|
||||
}
|
||||
} else if (!isInitialized) {
|
||||
|
||||
// set monero connection from startup arguments
|
||||
MoneroRpcConnection connection = new MoneroRpcConnection(config.xmrNode, config.xmrNodeUsername, config.xmrNodePassword).setPriority(1);
|
||||
if (connection.isOnion()) connection.setProxyUri(getProxyUri());
|
||||
if (useProxy(connection)) connection.setProxyUri(getProxyUri());
|
||||
connectionManager.setConnection(connection);
|
||||
currentConnectionUri = Optional.of(connection.getUri());
|
||||
}
|
||||
|
||||
// set connection proxies
|
||||
log.info("TOR proxy URI: " + getProxyUri());
|
||||
for (MoneroRpcConnection connection : connectionManager.getConnections()) {
|
||||
if (useProxy(connection)) connection.setProxyUri(getProxyUri());
|
||||
}
|
||||
|
||||
// restore configuration
|
||||
if ("".equals(config.xmrNode)) connectionManager.setAutoSwitch(connectionList.getAutoSwitch());
|
||||
|
||||
|
@ -95,7 +95,7 @@ public class WalletAppSetup {
|
||||
this.connectionService = connectionService;
|
||||
this.config = config;
|
||||
this.preferences = preferences;
|
||||
this.useTorForBTC.set(preferences.getUseTorForBitcoinJ());
|
||||
this.useTorForBTC.set(preferences.getUseTorForMonero());
|
||||
}
|
||||
|
||||
void init(@Nullable Consumer<String> chainFileLockedExceptionHandler,
|
||||
@ -259,9 +259,9 @@ public class WalletAppSetup {
|
||||
|
||||
private String getBtcNetworkAsString() {
|
||||
String postFix;
|
||||
if (config.ignoreLocalBtcNode)
|
||||
if (config.ignoreLocalXmrNode)
|
||||
postFix = " " + Res.get("mainView.footer.localhostBitcoinNode");
|
||||
else if (preferences.getUseTorForBitcoinJ())
|
||||
else if (preferences.getUseTorForMonero())
|
||||
postFix = " " + Res.get("mainView.footer.usingTor");
|
||||
else
|
||||
postFix = "";
|
||||
|
@ -53,7 +53,7 @@ public final class Filter implements ProtectedStoragePayload, ExpirablePayload {
|
||||
private final List<String> seedNodes;
|
||||
private final List<String> priceRelayNodes;
|
||||
private final boolean preventPublicBtcNetwork;
|
||||
private final List<String> btcNodes;
|
||||
private final List<String> xmrNodes;
|
||||
// SignatureAsBase64 is not set initially as we use the serialized data for signing. We set it after signature is
|
||||
// created by cloning the object with a non-null sig.
|
||||
@Nullable
|
||||
@ -104,7 +104,7 @@ public final class Filter implements ProtectedStoragePayload, ExpirablePayload {
|
||||
filter.getSeedNodes(),
|
||||
filter.getPriceRelayNodes(),
|
||||
filter.isPreventPublicBtcNetwork(),
|
||||
filter.getBtcNodes(),
|
||||
filter.getXmrNodes(),
|
||||
filter.getDisableTradeBelowVersion(),
|
||||
filter.getMediators(),
|
||||
filter.getRefundAgents(),
|
||||
@ -134,7 +134,7 @@ public final class Filter implements ProtectedStoragePayload, ExpirablePayload {
|
||||
filter.getSeedNodes(),
|
||||
filter.getPriceRelayNodes(),
|
||||
filter.isPreventPublicBtcNetwork(),
|
||||
filter.getBtcNodes(),
|
||||
filter.getXmrNodes(),
|
||||
filter.getDisableTradeBelowVersion(),
|
||||
filter.getMediators(),
|
||||
filter.getRefundAgents(),
|
||||
@ -162,7 +162,7 @@ public final class Filter implements ProtectedStoragePayload, ExpirablePayload {
|
||||
List<String> seedNodes,
|
||||
List<String> priceRelayNodes,
|
||||
boolean preventPublicBtcNetwork,
|
||||
List<String> btcNodes,
|
||||
List<String> xmrNodes,
|
||||
String disableTradeBelowVersion,
|
||||
List<String> mediators,
|
||||
List<String> refundAgents,
|
||||
@ -185,7 +185,7 @@ public final class Filter implements ProtectedStoragePayload, ExpirablePayload {
|
||||
seedNodes,
|
||||
priceRelayNodes,
|
||||
preventPublicBtcNetwork,
|
||||
btcNodes,
|
||||
xmrNodes,
|
||||
disableTradeBelowVersion,
|
||||
mediators,
|
||||
refundAgents,
|
||||
@ -219,7 +219,7 @@ public final class Filter implements ProtectedStoragePayload, ExpirablePayload {
|
||||
List<String> seedNodes,
|
||||
List<String> priceRelayNodes,
|
||||
boolean preventPublicBtcNetwork,
|
||||
List<String> btcNodes,
|
||||
List<String> xmrNodes,
|
||||
String disableTradeBelowVersion,
|
||||
List<String> mediators,
|
||||
List<String> refundAgents,
|
||||
@ -245,7 +245,7 @@ public final class Filter implements ProtectedStoragePayload, ExpirablePayload {
|
||||
this.seedNodes = seedNodes;
|
||||
this.priceRelayNodes = priceRelayNodes;
|
||||
this.preventPublicBtcNetwork = preventPublicBtcNetwork;
|
||||
this.btcNodes = btcNodes;
|
||||
this.xmrNodes = xmrNodes;
|
||||
this.disableTradeBelowVersion = disableTradeBelowVersion;
|
||||
this.mediators = mediators;
|
||||
this.refundAgents = refundAgents;
|
||||
@ -286,7 +286,7 @@ public final class Filter implements ProtectedStoragePayload, ExpirablePayload {
|
||||
.addAllSeedNodes(seedNodes)
|
||||
.addAllPriceRelayNodes(priceRelayNodes)
|
||||
.setPreventPublicBtcNetwork(preventPublicBtcNetwork)
|
||||
.addAllBtcNodes(btcNodes)
|
||||
.addAllXmrNodes(xmrNodes)
|
||||
.setDisableTradeBelowVersion(disableTradeBelowVersion)
|
||||
.addAllMediators(mediators)
|
||||
.addAllRefundAgents(refundAgents)
|
||||
@ -323,7 +323,7 @@ public final class Filter implements ProtectedStoragePayload, ExpirablePayload {
|
||||
ProtoUtil.protocolStringListToList(proto.getSeedNodesList()),
|
||||
ProtoUtil.protocolStringListToList(proto.getPriceRelayNodesList()),
|
||||
proto.getPreventPublicBtcNetwork(),
|
||||
ProtoUtil.protocolStringListToList(proto.getBtcNodesList()),
|
||||
ProtoUtil.protocolStringListToList(proto.getXmrNodesList()),
|
||||
proto.getDisableTradeBelowVersion(),
|
||||
ProtoUtil.protocolStringListToList(proto.getMediatorsList()),
|
||||
ProtoUtil.protocolStringListToList(proto.getRefundAgentsList()),
|
||||
@ -366,7 +366,7 @@ public final class Filter implements ProtectedStoragePayload, ExpirablePayload {
|
||||
",\n seedNodes=" + seedNodes +
|
||||
",\n priceRelayNodes=" + priceRelayNodes +
|
||||
",\n preventPublicBtcNetwork=" + preventPublicBtcNetwork +
|
||||
",\n btcNodes=" + btcNodes +
|
||||
",\n xmrNodes=" + xmrNodes +
|
||||
",\n signatureAsBase64='" + signatureAsBase64 + '\'' +
|
||||
",\n signerPubKeyAsHex='" + signerPubKeyAsHex + '\'' +
|
||||
",\n ownerPubKeyBytes=" + Utilities.bytesAsHexString(ownerPubKeyBytes) +
|
||||
|
@ -28,7 +28,7 @@ import haveno.core.payment.payload.PaymentMethod;
|
||||
import haveno.core.provider.ProvidersRepository;
|
||||
import haveno.core.user.Preferences;
|
||||
import haveno.core.user.User;
|
||||
import haveno.core.xmr.nodes.BtcNodes;
|
||||
import haveno.core.xmr.nodes.XmrNodes;
|
||||
import haveno.network.p2p.NodeAddress;
|
||||
import haveno.network.p2p.P2PService;
|
||||
import haveno.network.p2p.P2PServiceListener;
|
||||
@ -69,7 +69,7 @@ import static org.bitcoinj.core.Utils.HEX;
|
||||
public class FilterManager {
|
||||
private static final String BANNED_PRICE_RELAY_NODES = "bannedPriceRelayNodes";
|
||||
private static final String BANNED_SEED_NODES = "bannedSeedNodes";
|
||||
private static final String BANNED_BTC_NODES = "bannedBtcNodes";
|
||||
private static final String BANNED_XMR_NODES = "bannedXmrNodes";
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Listener
|
||||
@ -497,7 +497,7 @@ public class FilterManager {
|
||||
// nodes at the next startup and don't update the list in the P2P network domain.
|
||||
// We persist it to the property file which is read before any other initialisation.
|
||||
saveBannedNodes(BANNED_SEED_NODES, newFilter.getSeedNodes());
|
||||
saveBannedNodes(BANNED_BTC_NODES, newFilter.getBtcNodes());
|
||||
saveBannedNodes(BANNED_XMR_NODES, newFilter.getXmrNodes());
|
||||
|
||||
// Banned price relay nodes we can apply at runtime
|
||||
List<String> priceRelayNodes = newFilter.getPriceRelayNodes();
|
||||
@ -508,8 +508,8 @@ public class FilterManager {
|
||||
|
||||
//TODO should be moved to client with listening on onFilterAdded
|
||||
if (newFilter.isPreventPublicBtcNetwork() &&
|
||||
preferences.getBitcoinNodesOptionOrdinal() == BtcNodes.BitcoinNodesOption.PUBLIC.ordinal()) {
|
||||
preferences.setBitcoinNodesOptionOrdinal(BtcNodes.BitcoinNodesOption.PROVIDED.ordinal());
|
||||
preferences.getMoneroNodesOptionOrdinal() == XmrNodes.MoneroNodesOption.PUBLIC.ordinal()) {
|
||||
preferences.setMoneroNodesOptionOrdinal(XmrNodes.MoneroNodesOption.PROVIDED.ordinal());
|
||||
}
|
||||
|
||||
listeners.forEach(e -> e.onFilterAdded(newFilter));
|
||||
@ -541,7 +541,7 @@ public class FilterManager {
|
||||
|
||||
// Clears options files from banned nodes
|
||||
private void clearBannedNodes() {
|
||||
saveBannedNodes(BANNED_BTC_NODES, null);
|
||||
saveBannedNodes(BANNED_XMR_NODES, null);
|
||||
saveBannedNodes(BANNED_SEED_NODES, null);
|
||||
saveBannedNodes(BANNED_PRICE_RELAY_NODES, null);
|
||||
|
||||
|
@ -32,7 +32,7 @@ import haveno.core.locale.TradeCurrency;
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import haveno.core.payment.PaymentAccountUtil;
|
||||
import haveno.core.xmr.MoneroNodeSettings;
|
||||
import haveno.core.xmr.nodes.BtcNodes;
|
||||
import haveno.core.xmr.nodes.XmrNodes;
|
||||
import haveno.core.xmr.nodes.LocalBitcoinNode;
|
||||
import haveno.core.xmr.wallet.Restrictions;
|
||||
import haveno.network.p2p.network.BridgeAddressProvider;
|
||||
@ -154,7 +154,7 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||
private final PersistenceManager<PreferencesPayload> persistenceManager;
|
||||
private final Config config;
|
||||
private final LocalBitcoinNode localBitcoinNode;
|
||||
private final String btcNodesFromOptions;
|
||||
private final String xmrNodesFromOptions;
|
||||
@Getter
|
||||
private final BooleanProperty useStandbyModeProperty = new SimpleBooleanProperty(prefPayload.isUseStandbyMode());
|
||||
|
||||
@ -166,12 +166,12 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||
public Preferences(PersistenceManager<PreferencesPayload> persistenceManager,
|
||||
Config config,
|
||||
LocalBitcoinNode localBitcoinNode,
|
||||
@Named(Config.BTC_NODES) String btcNodesFromOptions) {
|
||||
@Named(Config.XMR_NODES) String xmrNodesFromOptions) {
|
||||
|
||||
this.persistenceManager = persistenceManager;
|
||||
this.config = config;
|
||||
this.localBitcoinNode = localBitcoinNode;
|
||||
this.btcNodesFromOptions = btcNodesFromOptions;
|
||||
this.xmrNodesFromOptions = xmrNodesFromOptions;
|
||||
|
||||
useAnimationsProperty.addListener((ov) -> {
|
||||
prefPayload.setUseAnimations(useAnimationsProperty.get());
|
||||
@ -303,16 +303,16 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||
dontShowAgainMapAsObservable.putAll(getDontShowAgainMap());
|
||||
|
||||
// Override settings with options if set
|
||||
if (config.useTorForBtcOptionSetExplicitly)
|
||||
setUseTorForBitcoinJ(config.useTorForBtc);
|
||||
if (config.useTorForXmrOptionSetExplicitly)
|
||||
setUseTorForMonero(config.useTorForXmr);
|
||||
|
||||
if (btcNodesFromOptions != null && !btcNodesFromOptions.isEmpty()) {
|
||||
if (getBitcoinNodes() != null && !getBitcoinNodes().equals(btcNodesFromOptions)) {
|
||||
if (xmrNodesFromOptions != null && !xmrNodesFromOptions.isEmpty()) {
|
||||
if (getMoneroNodes() != null && !getMoneroNodes().equals(xmrNodesFromOptions)) {
|
||||
log.warn("The Bitcoin node(s) from the program argument and the one(s) persisted in the UI are different. " +
|
||||
"The Bitcoin node(s) {} from the program argument will be used.", btcNodesFromOptions);
|
||||
"The Bitcoin node(s) {} from the program argument will be used.", xmrNodesFromOptions);
|
||||
}
|
||||
setBitcoinNodes(btcNodesFromOptions);
|
||||
setBitcoinNodesOptionOrdinal(BtcNodes.BitcoinNodesOption.CUSTOM.ordinal());
|
||||
setMoneroNodes(xmrNodesFromOptions);
|
||||
setMoneroNodesOptionOrdinal(XmrNodes.MoneroNodesOption.CUSTOM.ordinal());
|
||||
}
|
||||
|
||||
if (prefPayload.getIgnoreDustThreshold() < Restrictions.getMinNonDustOutput().value) {
|
||||
@ -492,8 +492,8 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||
}
|
||||
}
|
||||
|
||||
public void setUseTorForBitcoinJ(boolean useTorForBitcoinJ) {
|
||||
prefPayload.setUseTorForBitcoinJ(useTorForBitcoinJ);
|
||||
public void setUseTorForMonero(boolean useTorForMonero) {
|
||||
prefPayload.setUseTorForMonero(useTorForMonero);
|
||||
requestPersistence();
|
||||
}
|
||||
|
||||
@ -577,8 +577,8 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||
requestPersistence();
|
||||
}
|
||||
|
||||
public void setBitcoinNodes(String bitcoinNodes) {
|
||||
prefPayload.setBitcoinNodes(bitcoinNodes);
|
||||
public void setMoneroNodes(String bitcoinNodes) {
|
||||
prefPayload.setMoneroNodes(bitcoinNodes);
|
||||
requestPersistence();
|
||||
}
|
||||
|
||||
@ -663,8 +663,8 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||
persistenceManager.forcePersistNow();
|
||||
}
|
||||
|
||||
public void setBitcoinNodesOptionOrdinal(int bitcoinNodesOptionOrdinal) {
|
||||
prefPayload.setBitcoinNodesOptionOrdinal(bitcoinNodesOptionOrdinal);
|
||||
public void setMoneroNodesOptionOrdinal(int bitcoinNodesOptionOrdinal) {
|
||||
prefPayload.setMoneroNodesOptionOrdinal(bitcoinNodesOptionOrdinal);
|
||||
requestPersistence();
|
||||
}
|
||||
|
||||
@ -793,18 +793,8 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||
return !prefPayload.getDontShowAgainMap().containsKey(key) || !prefPayload.getDontShowAgainMap().get(key);
|
||||
}
|
||||
|
||||
public boolean getUseTorForBitcoinJ() {
|
||||
// We override the useTorForBitcoinJ and set it to false if we will use a
|
||||
// localhost Bitcoin node or if we are not on mainnet, unless the useTorForBtc
|
||||
// parameter is explicitly provided. On testnet there are very few Bitcoin tor
|
||||
// nodes and we don't provide tor nodes.
|
||||
|
||||
if ((!Config.baseCurrencyNetwork().isMainnet()
|
||||
|| localBitcoinNode.shouldBeUsed())
|
||||
&& !config.useTorForBtcOptionSetExplicitly)
|
||||
return false;
|
||||
else
|
||||
return prefPayload.isUseTorForBitcoinJ();
|
||||
public boolean getUseTorForMonero() {
|
||||
return prefPayload.isUseTorForMonero();
|
||||
}
|
||||
|
||||
public double getBuyerSecurityDepositAsPercent(PaymentAccount paymentAccount) {
|
||||
@ -869,7 +859,7 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||
|
||||
void setPreferredTradeCurrency(TradeCurrency preferredTradeCurrency);
|
||||
|
||||
void setUseTorForBitcoinJ(boolean useTorForBitcoinJ);
|
||||
void setUseTorForMonero(boolean useTorForMonero);
|
||||
|
||||
void setShowOwnOffersInOfferBook(boolean showOwnOffersInOfferBook);
|
||||
|
||||
@ -899,7 +889,7 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||
|
||||
void setSortMarketCurrenciesNumerically(boolean sortMarketCurrenciesNumerically);
|
||||
|
||||
void setBitcoinNodes(String bitcoinNodes);
|
||||
void setMoneroNodes(String bitcoinNodes);
|
||||
|
||||
void setUseCustomWithdrawalTxFee(boolean useCustomWithdrawalTxFee);
|
||||
|
||||
@ -931,7 +921,7 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||
|
||||
void setCustomBridges(String customBridges);
|
||||
|
||||
void setBitcoinNodesOptionOrdinal(int bitcoinNodesOption);
|
||||
void setMoneroNodesOptionOrdinal(int bitcoinNodesOption);
|
||||
|
||||
void setReferralId(String referralId);
|
||||
|
||||
|
@ -19,6 +19,7 @@ package haveno.core.user;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.protobuf.Message;
|
||||
|
||||
import haveno.common.proto.ProtoUtil;
|
||||
import haveno.common.proto.persistable.PersistableEnvelope;
|
||||
import haveno.core.locale.Country;
|
||||
@ -57,7 +58,7 @@ public final class PreferencesPayload implements PersistableEnvelope {
|
||||
private boolean autoSelectArbitrators = true;
|
||||
private Map<String, Boolean> dontShowAgainMap = new HashMap<>();
|
||||
private boolean tacAccepted;
|
||||
private boolean useTorForBitcoinJ = true;
|
||||
private boolean useTorForMonero = true;
|
||||
private boolean showOwnOffersInOfferBook = true;
|
||||
@Nullable
|
||||
private TradeCurrency preferredTradeCurrency;
|
||||
@ -81,8 +82,8 @@ public final class PreferencesPayload implements PersistableEnvelope {
|
||||
private boolean sortMarketCurrenciesNumerically = true;
|
||||
private boolean usePercentageBasedPrice = true;
|
||||
private Map<String, String> peerTagMap = new HashMap<>();
|
||||
// custom btc nodes
|
||||
private String bitcoinNodes = "";
|
||||
// custom xmr nodes
|
||||
private String moneroNodes = "";
|
||||
private List<String> ignoreTradersList = new ArrayList<>();
|
||||
private String directoryChooserPath;
|
||||
|
||||
@ -96,7 +97,7 @@ public final class PreferencesPayload implements PersistableEnvelope {
|
||||
private int torTransportOrdinal;
|
||||
@Nullable
|
||||
private String customBridges;
|
||||
private int bitcoinNodesOptionOrdinal;
|
||||
private int moneroNodesOptionOrdinal;
|
||||
@Nullable
|
||||
private String referralId;
|
||||
@Nullable
|
||||
@ -159,7 +160,7 @@ public final class PreferencesPayload implements PersistableEnvelope {
|
||||
.setAutoSelectArbitrators(autoSelectArbitrators)
|
||||
.putAllDontShowAgainMap(dontShowAgainMap)
|
||||
.setTacAccepted(tacAccepted)
|
||||
.setUseTorForBitcoinJ(useTorForBitcoinJ)
|
||||
.setUseTorForMonero(useTorForMonero)
|
||||
.setShowOwnOffersInOfferBook(showOwnOffersInOfferBook)
|
||||
.setWithdrawalTxFeeInVbytes(withdrawalTxFeeInVbytes)
|
||||
.setUseCustomWithdrawalTxFee(useCustomWithdrawalTxFee)
|
||||
@ -169,14 +170,14 @@ public final class PreferencesPayload implements PersistableEnvelope {
|
||||
.setSortMarketCurrenciesNumerically(sortMarketCurrenciesNumerically)
|
||||
.setUsePercentageBasedPrice(usePercentageBasedPrice)
|
||||
.putAllPeerTagMap(peerTagMap)
|
||||
.setBitcoinNodes(bitcoinNodes)
|
||||
.setMoneroNodes(moneroNodes)
|
||||
.addAllIgnoreTradersList(ignoreTradersList)
|
||||
.setDirectoryChooserPath(directoryChooserPath)
|
||||
.setUseAnimations(useAnimations)
|
||||
.setCssTheme(cssTheme)
|
||||
.setBridgeOptionOrdinal(bridgeOptionOrdinal)
|
||||
.setTorTransportOrdinal(torTransportOrdinal)
|
||||
.setBitcoinNodesOptionOrdinal(bitcoinNodesOptionOrdinal)
|
||||
.setMoneroNodesOptionOrdinal(moneroNodesOptionOrdinal)
|
||||
.setUseSoundForMobileNotifications(useSoundForMobileNotifications)
|
||||
.setUseTradeNotifications(useTradeNotifications)
|
||||
.setUseMarketNotifications(useMarketNotifications)
|
||||
@ -241,7 +242,7 @@ public final class PreferencesPayload implements PersistableEnvelope {
|
||||
proto.getAutoSelectArbitrators(),
|
||||
Maps.newHashMap(proto.getDontShowAgainMapMap()),
|
||||
proto.getTacAccepted(),
|
||||
proto.getUseTorForBitcoinJ(),
|
||||
proto.getUseTorForMonero(),
|
||||
proto.getShowOwnOffersInOfferBook(),
|
||||
proto.hasPreferredTradeCurrency() ? TradeCurrency.fromProto(proto.getPreferredTradeCurrency()) : null,
|
||||
proto.getWithdrawalTxFeeInVbytes(),
|
||||
@ -258,7 +259,7 @@ public final class PreferencesPayload implements PersistableEnvelope {
|
||||
proto.getSortMarketCurrenciesNumerically(),
|
||||
proto.getUsePercentageBasedPrice(),
|
||||
Maps.newHashMap(proto.getPeerTagMapMap()),
|
||||
proto.getBitcoinNodes(),
|
||||
proto.getMoneroNodes(),
|
||||
proto.getIgnoreTradersListList(),
|
||||
proto.getDirectoryChooserPath(),
|
||||
proto.getUseAnimations(),
|
||||
@ -268,7 +269,7 @@ public final class PreferencesPayload implements PersistableEnvelope {
|
||||
proto.getBridgeOptionOrdinal(),
|
||||
proto.getTorTransportOrdinal(),
|
||||
ProtoUtil.stringOrNullFromProto(proto.getCustomBridges()),
|
||||
proto.getBitcoinNodesOptionOrdinal(),
|
||||
proto.getMoneroNodesOptionOrdinal(),
|
||||
proto.getReferralId().isEmpty() ? null : proto.getReferralId(),
|
||||
proto.getPhoneKeyAndToken().isEmpty() ? null : proto.getPhoneKeyAndToken(),
|
||||
proto.getUseSoundForMobileNotifications(),
|
||||
|
@ -27,7 +27,7 @@ import haveno.core.provider.price.PriceFeedService;
|
||||
import haveno.core.xmr.model.AddressEntryList;
|
||||
import haveno.core.xmr.model.EncryptedConnectionList;
|
||||
import haveno.core.xmr.model.XmrAddressEntryList;
|
||||
import haveno.core.xmr.nodes.BtcNodes;
|
||||
import haveno.core.xmr.nodes.XmrNodes;
|
||||
import haveno.core.xmr.setup.RegTestHost;
|
||||
import haveno.core.xmr.setup.WalletsSetup;
|
||||
import haveno.core.xmr.wallet.BtcWalletService;
|
||||
@ -74,7 +74,7 @@ public class MoneroModule extends AppModule {
|
||||
bindConstant().annotatedWith(named(Config.XMR_NODE)).to(config.xmrNode);
|
||||
bindConstant().annotatedWith(named(Config.XMR_NODE_USERNAME)).to(config.xmrNodeUsername);
|
||||
bindConstant().annotatedWith(named(Config.XMR_NODE_PASSWORD)).to(config.xmrNodePassword);
|
||||
bindConstant().annotatedWith(named(Config.BTC_NODES)).to(config.btcNodes);
|
||||
bindConstant().annotatedWith(named(Config.XMR_NODES)).to(config.xmrNodes);
|
||||
bindConstant().annotatedWith(named(Config.USER_AGENT)).to(config.userAgent);
|
||||
bindConstant().annotatedWith(named(Config.NUM_CONNECTIONS_FOR_BTC)).to(config.numConnectionsForBtc);
|
||||
bindConstant().annotatedWith(named(Config.USE_ALL_PROVIDED_NODES)).to(config.useAllProvidedNodes);
|
||||
@ -89,7 +89,7 @@ public class MoneroModule extends AppModule {
|
||||
bind(BtcWalletService.class).in(Singleton.class);
|
||||
bind(TradeWalletService.class).in(Singleton.class);
|
||||
bind(NonBsqCoinSelector.class).in(Singleton.class);
|
||||
bind(BtcNodes.class).in(Singleton.class);
|
||||
bind(XmrNodes.class).in(Singleton.class);
|
||||
bind(Balances.class).in(Singleton.class);
|
||||
|
||||
bind(ProvidersRepository.class).in(Singleton.class);
|
||||
|
@ -148,7 +148,7 @@ public class EncryptedConnectionList implements PersistableEnvelope, PersistedDa
|
||||
writeLock.unlock();
|
||||
}
|
||||
if (currentValue != null) {
|
||||
throw new IllegalStateException(String.format("There exists already an connection for \"%s\"", connection.getUri()));
|
||||
throw new IllegalStateException(String.format("There exists already a connection for \"%s\"", connection.getUri()));
|
||||
}
|
||||
requestPersistence();
|
||||
}
|
||||
|
@ -1,178 +0,0 @@
|
||||
/*
|
||||
* This file is part of Haveno.
|
||||
*
|
||||
* Haveno is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Haveno is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package haveno.core.xmr.nodes;
|
||||
|
||||
import haveno.common.config.Config;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
|
||||
// Managed here: https://github.com/bisq-network/roles/issues/39
|
||||
@Slf4j
|
||||
public class BtcNodes {
|
||||
|
||||
public enum BitcoinNodesOption {
|
||||
PROVIDED,
|
||||
CUSTOM,
|
||||
PUBLIC
|
||||
}
|
||||
|
||||
// For other base currencies or testnet we ignore provided nodes
|
||||
public List<BtcNode> getProvidedBtcNodes() {
|
||||
return useProvidedBtcNodes() ?
|
||||
Arrays.asList(
|
||||
// emzy
|
||||
new BtcNode("btcnode1.emzy.de", "emzybtc3ewh7zihpkdvuwlgxrhzcxy2p5fvjggp7ngjbxcytxvt4rjid.onion", "167.86.90.239", BtcNode.DEFAULT_PORT, "@emzy"),
|
||||
new BtcNode("btcnode2.emzy.de", "emzybtc25oddoa2prol2znpz2axnrg6k77xwgirmhv7igoiucddsxiad.onion", "62.171.129.32", BtcNode.DEFAULT_PORT, "@emzy"),
|
||||
new BtcNode("btcnode3.emzy.de", "emzybtc5bnpb2o6gh54oquiox54o4r7yn4a2wiiwzrjonlouaibm2zid.onion", "136.243.53.40", BtcNode.DEFAULT_PORT, "@emzy"),
|
||||
new BtcNode("btcnode4.emzy.de", "emzybtc454ewbviqnmgtgx3rgublsgkk23r4onbhidcv36wremue4kqd.onion", "135.181.215.237", BtcNode.DEFAULT_PORT, "@emzy"),
|
||||
|
||||
// ripcurlx
|
||||
new BtcNode("bitcoin.christophatteneder.com", "catlnkpdm454ecngktyo4z22m5dlcvfvgzz4nt5l36eeczecrafslkqd.onion", "174.138.35.229", BtcNode.DEFAULT_PORT, "@Christoph"),
|
||||
|
||||
// mrosseel
|
||||
new BtcNode("btc.vante.me", "bsqbtctulf2g4jtjsdfgl2ed7qs6zz5wqx27qnyiik7laockryvszqqd.onion", "94.23.21.80", BtcNode.DEFAULT_PORT, "@miker"),
|
||||
new BtcNode("btc2.vante.me", "bsqbtcparrfihlwolt4xgjbf4cgqckvrvsfyvy6vhiqrnh4w6ghixoid.onion", "94.23.205.110", BtcNode.DEFAULT_PORT, "@miker"),
|
||||
|
||||
// sqrrm
|
||||
new BtcNode("btc1.sqrrm.net", "jygcc54etaubgdpcvzgbihjaqbc37cstpvum5sjzvka4bibkp4wrgnqd.onion", "185.25.48.184", BtcNode.DEFAULT_PORT, "@sqrrm"),
|
||||
new BtcNode("btc2.sqrrm.net", "h32haomoe52ljz6qopedsocvotvoj5lm2zmecfhdhawb3flbsf64l2qd.onion", "81.171.22.143", BtcNode.DEFAULT_PORT, "@sqrrm"),
|
||||
|
||||
// KanoczTomas
|
||||
new BtcNode("btc.ispol.sk", "mbm6ffx6j5ygi2ck.onion", "193.58.196.212", BtcNode.DEFAULT_PORT, "@KanoczTomas"),
|
||||
|
||||
// Devin Bileck
|
||||
new BtcNode("btc1.haveno.services", "devinbtctu7uctl7hly2juu3thbgeivfnvw3ckj3phy6nyvpnx66yeyd.onion", "172.105.21.216", BtcNode.DEFAULT_PORT, "@devinbileck"),
|
||||
new BtcNode("btc2.haveno.services", "devinbtcyk643iruzfpaxw3on2jket7rbjmwygm42dmdyub3ietrbmid.onion", "173.255.240.205", BtcNode.DEFAULT_PORT, "@devinbileck"),
|
||||
new BtcNode(null, "devinbtcmwkuitvxl3tfi5of4zau46ymeannkjv6fpnylkgf3q5fa3id.onion", null, BtcNode.DEFAULT_PORT, "@devinbileck"),
|
||||
|
||||
// m52go
|
||||
new BtcNode(null, "rss2u4embqa6fzuaiuvpp6szklkdckrcfgv6zer3ngclkzclvstywjyd.onion", null, BtcNode.DEFAULT_PORT, "@m52go"),
|
||||
// wiz
|
||||
new BtcNode("node130.hnl.wiz.biz", "wizbit5555bsslwv4ctronnsgk5vh2w2pdx7v7eyuivlyuoteejk7lid.onion", "103.99.168.130", BtcNode.DEFAULT_PORT, "@wiz"),
|
||||
new BtcNode("node140.hnl.wiz.biz", "jto2jfbsxhb6yvhcrrjddrgbakte6tgsy3c3z3prss64gndgvovvosyd.onion", "103.99.168.140", BtcNode.DEFAULT_PORT, "@wiz"),
|
||||
new BtcNode("node210.fmt.wiz.biz", "rfqmn3qe36uaptkxhdvi74p4hyrzhir6vhmzb2hqryxodig4gue2zbyd.onion", "103.99.170.210", BtcNode.DEFAULT_PORT, "@wiz"),
|
||||
new BtcNode("node220.fmt.wiz.biz", "azbpsh4arqlm6442wfimy7qr65bmha2zhgjg7wbaji6vvaug53hur2qd.onion", "103.99.170.220", BtcNode.DEFAULT_PORT, "@wiz")
|
||||
) :
|
||||
new ArrayList<>();
|
||||
}
|
||||
|
||||
public boolean useProvidedBtcNodes() {
|
||||
return Config.baseCurrencyNetwork().isMainnet();
|
||||
}
|
||||
|
||||
public static List<BtcNodes.BtcNode> toBtcNodesList(Collection<String> nodes) {
|
||||
return nodes.stream()
|
||||
.filter(e -> !e.isEmpty())
|
||||
.map(BtcNodes.BtcNode::fromFullAddress)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@EqualsAndHashCode
|
||||
@Getter
|
||||
public static class BtcNode {
|
||||
private static final int DEFAULT_PORT = Config.baseCurrencyNetworkParameters().getPort(); //8333
|
||||
|
||||
@Nullable
|
||||
private final String onionAddress;
|
||||
@Nullable
|
||||
private final String hostName;
|
||||
@Nullable
|
||||
private final String operator; // null in case the user provides a list of custom btc nodes
|
||||
@Nullable
|
||||
private final String address; // IPv4 address
|
||||
private int port = DEFAULT_PORT;
|
||||
|
||||
/**
|
||||
* @param fullAddress [IPv4 address:port or onion:port]
|
||||
* @return BtcNode instance
|
||||
*/
|
||||
public static BtcNode fromFullAddress(String fullAddress) {
|
||||
String[] parts = fullAddress.split("]");
|
||||
checkArgument(parts.length > 0);
|
||||
String host = "";
|
||||
int port = DEFAULT_PORT;
|
||||
if (parts[0].contains("[") && parts[0].contains(":")) {
|
||||
// IPv6 address and optional port number
|
||||
// address part delimited by square brackets e.g. [2a01:123:456:789::2]:8333
|
||||
host = parts[0].replace("[", "").replace("]", "");
|
||||
if (parts.length == 2)
|
||||
port = Integer.parseInt(parts[1].replace(":", ""));
|
||||
} else if (parts[0].contains(":") && !parts[0].contains(".")) {
|
||||
// IPv6 address only; not delimited by square brackets
|
||||
host = parts[0];
|
||||
} else if (parts[0].contains(".")) {
|
||||
// address and an optional port number
|
||||
// e.g. 127.0.0.1:8333 or abcdef123xyz.onion:9999
|
||||
parts = fullAddress.split(":");
|
||||
checkArgument(parts.length > 0);
|
||||
host = parts[0];
|
||||
if (parts.length == 2)
|
||||
port = Integer.parseInt(parts[1]);
|
||||
}
|
||||
|
||||
checkArgument(host.length() > 0, "BtcNode address format not recognised");
|
||||
return host.contains(".onion") ? new BtcNode(null, host, null, port, null) : new BtcNode(null, null, host, port, null);
|
||||
}
|
||||
|
||||
public BtcNode(@Nullable String hostName,
|
||||
@Nullable String onionAddress,
|
||||
@Nullable String address,
|
||||
int port,
|
||||
@Nullable String operator) {
|
||||
this.hostName = hostName;
|
||||
this.onionAddress = onionAddress;
|
||||
this.address = address;
|
||||
this.port = port;
|
||||
this.operator = operator;
|
||||
}
|
||||
|
||||
public boolean hasOnionAddress() {
|
||||
return onionAddress != null;
|
||||
}
|
||||
|
||||
public String getHostNameOrAddress() {
|
||||
if (hostName != null)
|
||||
return hostName;
|
||||
else
|
||||
return address;
|
||||
}
|
||||
|
||||
public boolean hasClearNetAddress() {
|
||||
return hostName != null || address != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "onionAddress='" + onionAddress + '\'' +
|
||||
", hostName='" + hostName + '\'' +
|
||||
", address='" + address + '\'' +
|
||||
", port='" + port + '\'' +
|
||||
", operator='" + operator;
|
||||
}
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@ import java.net.Socket;
|
||||
/**
|
||||
* Detects whether a Bitcoin node is running on localhost and contains logic for when to
|
||||
* ignore it. The query methods lazily trigger the needed checks and cache the results.
|
||||
* @see haveno.common.config.Config#ignoreLocalBtcNode
|
||||
* @see haveno.common.config.Config#ignoreLocalXmrNode
|
||||
*/
|
||||
@Singleton
|
||||
public class LocalBitcoinNode {
|
||||
@ -49,7 +49,7 @@ public class LocalBitcoinNode {
|
||||
*/
|
||||
public boolean shouldBeIgnored() {
|
||||
BaseCurrencyNetwork baseCurrencyNetwork = config.baseCurrencyNetwork;
|
||||
return config.ignoreLocalBtcNode;
|
||||
return config.ignoreLocalXmrNode;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,8 +30,8 @@ import org.slf4j.LoggerFactory;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class BtcNetworkConfig {
|
||||
private static final Logger log = LoggerFactory.getLogger(BtcNetworkConfig.class);
|
||||
public class XmrNetworkConfig {
|
||||
private static final Logger log = LoggerFactory.getLogger(XmrNetworkConfig.class);
|
||||
|
||||
@Nullable
|
||||
private final Socks5Proxy proxy;
|
||||
@ -39,7 +39,7 @@ public class BtcNetworkConfig {
|
||||
private final NetworkParameters parameters;
|
||||
private final int socks5DiscoverMode;
|
||||
|
||||
public BtcNetworkConfig(WalletConfig delegate, NetworkParameters parameters, int socks5DiscoverMode,
|
||||
public XmrNetworkConfig(WalletConfig delegate, NetworkParameters parameters, int socks5DiscoverMode,
|
||||
@Nullable Socks5Proxy proxy) {
|
||||
this.delegate = delegate;
|
||||
this.parameters = parameters;
|
@ -18,7 +18,7 @@
|
||||
package haveno.core.xmr.nodes;
|
||||
|
||||
import com.runjva.sourceforge.jsocks.protocol.Socks5Proxy;
|
||||
import haveno.core.xmr.nodes.BtcNodes.BtcNode;
|
||||
import haveno.core.xmr.nodes.XmrNodes.XmrNode;
|
||||
import haveno.network.DnsLookupException;
|
||||
import haveno.network.DnsLookupTor;
|
||||
import org.bitcoinj.core.PeerAddress;
|
||||
@ -32,28 +32,28 @@ import java.net.InetSocketAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.Objects;
|
||||
|
||||
class BtcNodeConverter {
|
||||
private static final Logger log = LoggerFactory.getLogger(BtcNodeConverter.class);
|
||||
class XmrNodeConverter {
|
||||
private static final Logger log = LoggerFactory.getLogger(XmrNodeConverter.class);
|
||||
|
||||
private final Facade facade;
|
||||
|
||||
BtcNodeConverter() {
|
||||
XmrNodeConverter() {
|
||||
this.facade = new Facade();
|
||||
}
|
||||
|
||||
BtcNodeConverter(Facade facade) {
|
||||
XmrNodeConverter(Facade facade) {
|
||||
this.facade = facade;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
PeerAddress convertOnionHost(BtcNode node) {
|
||||
PeerAddress convertOnionHost(XmrNode node) {
|
||||
// no DNS lookup for onion addresses
|
||||
String onionAddress = Objects.requireNonNull(node.getOnionAddress());
|
||||
return new PeerAddress(onionAddress, node.getPort());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
PeerAddress convertClearNode(BtcNode node) {
|
||||
PeerAddress convertClearNode(XmrNode node) {
|
||||
int port = node.getPort();
|
||||
|
||||
PeerAddress result = create(node.getHostNameOrAddress(), port);
|
||||
@ -69,7 +69,7 @@ class BtcNodeConverter {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
PeerAddress convertWithTor(BtcNode node, Socks5Proxy proxy) {
|
||||
PeerAddress convertWithTor(XmrNode node, Socks5Proxy proxy) {
|
||||
int port = node.getPort();
|
||||
|
||||
PeerAddress result = create(proxy, node.getHostNameOrAddress(), port);
|
192
core/src/main/java/haveno/core/xmr/nodes/XmrNodes.java
Normal file
192
core/src/main/java/haveno/core/xmr/nodes/XmrNodes.java
Normal file
@ -0,0 +1,192 @@
|
||||
/*
|
||||
* This file is part of Haveno.
|
||||
*
|
||||
* Haveno is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Haveno is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package haveno.core.xmr.nodes;
|
||||
|
||||
import haveno.common.config.Config;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
|
||||
@Slf4j
|
||||
public class XmrNodes {
|
||||
|
||||
// TODO: rename to XmrNodeType ?
|
||||
public enum MoneroNodesOption {
|
||||
PROVIDED,
|
||||
CUSTOM,
|
||||
PUBLIC
|
||||
}
|
||||
|
||||
public List<XmrNode> selectPreferredNodes(XmrNodesSetupPreferences xmrNodesSetupPreferences) {
|
||||
return xmrNodesSetupPreferences.selectPreferredNodes(this);
|
||||
}
|
||||
|
||||
// TODO: always using null hostname
|
||||
public List<XmrNode> getAllXmrNodes() {
|
||||
switch (Config.baseCurrencyNetwork()) {
|
||||
case XMR_LOCAL:
|
||||
return Arrays.asList(
|
||||
new XmrNode(MoneroNodesOption.PROVIDED, null, null, "127.0.0.1", 28081, 1, "@local")
|
||||
);
|
||||
case XMR_STAGENET:
|
||||
return Arrays.asList(
|
||||
new XmrNode(MoneroNodesOption.PROVIDED, null, null, "127.0.0.1", 38081, 1, "@local"),
|
||||
new XmrNode(MoneroNodesOption.PROVIDED, null, null, "127.0.0.1", 39081, 1, "@local"),
|
||||
new XmrNode(MoneroNodesOption.PROVIDED, null, null, "45.63.8.26", 38081, 1, "@haveno"),
|
||||
new XmrNode(MoneroNodesOption.PROVIDED, null, null, "stagenet.community.rino.io", 38081, 2, "@RINOwallet"),
|
||||
new XmrNode(MoneroNodesOption.PUBLIC, null, null, "stagenet.melo.tools", 38081, 2, null),
|
||||
new XmrNode(MoneroNodesOption.PUBLIC, null, null, "node.sethforprivacy.com", 38089, 2, null),
|
||||
new XmrNode(MoneroNodesOption.PUBLIC, null, null, "node2.sethforprivacy.com", 38089, 2, null),
|
||||
new XmrNode(MoneroNodesOption.PUBLIC, null, "plowsof3t5hogddwabaeiyrno25efmzfxyro2vligremt7sxpsclfaid.onion", null, 38089, 2, null)
|
||||
);
|
||||
case XMR_MAINNET:
|
||||
return Arrays.asList(
|
||||
new XmrNode(MoneroNodesOption.PROVIDED, null, null, "127.0.0.1", 18081, 1, "@local"),
|
||||
new XmrNode(MoneroNodesOption.PROVIDED, null, null, "xmr-node.cakewallet.com", 18081, 1, "@cakewallet"),
|
||||
new XmrNode(MoneroNodesOption.PUBLIC, null, null, "node.community.rino.io", 18081, 2, "@RINOwallet"),
|
||||
new XmrNode(MoneroNodesOption.PUBLIC, null, null, "xmr-node-eu.cakewallet.com", 18081, 2, "@cakewallet"),
|
||||
new XmrNode(MoneroNodesOption.PUBLIC, null, null, "xmr-node-usa-east.cakewallet.com", 18081, 2, "@cakewallet"),
|
||||
new XmrNode(MoneroNodesOption.PUBLIC, null, null, "xmr-node-uk.cakewallet.com", 18081, 2, "@cakewallet"),
|
||||
new XmrNode(MoneroNodesOption.PUBLIC, null, null, "node.sethforprivacy.com", 18089, 2, "@sethforprivacy")
|
||||
);
|
||||
default:
|
||||
throw new IllegalStateException("Unexpected base currency network: " + Config.baseCurrencyNetwork());
|
||||
}
|
||||
}
|
||||
|
||||
public List<XmrNode> getProvidedXmrNodes() {
|
||||
return getXmrNodes(MoneroNodesOption.PROVIDED);
|
||||
}
|
||||
|
||||
public List<XmrNode> getPublicXmrNodes() {
|
||||
return getXmrNodes(MoneroNodesOption.PUBLIC);
|
||||
}
|
||||
|
||||
private List<XmrNode> getXmrNodes(MoneroNodesOption type) {
|
||||
List<XmrNode> nodes = new ArrayList<>();
|
||||
for (XmrNode node : getAllXmrNodes()) if (node.getType() == type) nodes.add(node);
|
||||
return nodes;
|
||||
}
|
||||
|
||||
public static List<XmrNodes.XmrNode> toCustomXmrNodesList(Collection<String> nodes) {
|
||||
return nodes.stream()
|
||||
.filter(e -> !e.isEmpty())
|
||||
.map(XmrNodes.XmrNode::fromFullAddress)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@EqualsAndHashCode
|
||||
@Getter
|
||||
public static class XmrNode {
|
||||
private static final int DEFAULT_PORT = Config.baseCurrencyNetworkParameters().getPort();
|
||||
|
||||
private final MoneroNodesOption type;
|
||||
@Nullable
|
||||
private final String onionAddress;
|
||||
@Nullable
|
||||
private final String hostName;
|
||||
@Nullable
|
||||
private final String operator; // null in case the user provides a list of custom btc nodes
|
||||
@Nullable
|
||||
private final String address; // IPv4 address
|
||||
private int port = DEFAULT_PORT;
|
||||
private int priority = 0;
|
||||
|
||||
/**
|
||||
* @param fullAddress [IPv4 address:port or onion:port]
|
||||
* @return XmrNode instance
|
||||
*/
|
||||
public static XmrNode fromFullAddress(String fullAddress) {
|
||||
String[] parts = fullAddress.split("]");
|
||||
checkArgument(parts.length > 0);
|
||||
String host = "";
|
||||
int port = DEFAULT_PORT;
|
||||
if (parts[0].contains("[") && parts[0].contains(":")) {
|
||||
// IPv6 address and optional port number
|
||||
// address part delimited by square brackets e.g. [2a01:123:456:789::2]:8333
|
||||
host = parts[0].replace("[", "").replace("]", "");
|
||||
if (parts.length == 2)
|
||||
port = Integer.parseInt(parts[1].replace(":", ""));
|
||||
} else if (parts[0].contains(":") && !parts[0].contains(".")) {
|
||||
// IPv6 address only; not delimited by square brackets
|
||||
host = parts[0];
|
||||
} else if (parts[0].contains(".")) {
|
||||
// address and an optional port number
|
||||
// e.g. 127.0.0.1:8333 or abcdef123xyz.onion:9999
|
||||
parts = fullAddress.split(":");
|
||||
checkArgument(parts.length > 0);
|
||||
host = parts[0];
|
||||
if (parts.length == 2)
|
||||
port = Integer.parseInt(parts[1]);
|
||||
}
|
||||
|
||||
checkArgument(host.length() > 0, "XmrNode address format not recognised");
|
||||
return host.contains(".onion") ? new XmrNode(MoneroNodesOption.CUSTOM, null, host, null, port, null, null) : new XmrNode(MoneroNodesOption.CUSTOM, null, null, host, port, null, null);
|
||||
}
|
||||
|
||||
public XmrNode(MoneroNodesOption type,
|
||||
@Nullable String hostName,
|
||||
@Nullable String onionAddress,
|
||||
@Nullable String address,
|
||||
int port,
|
||||
Integer priority,
|
||||
@Nullable String operator) {
|
||||
this.type = type;
|
||||
this.hostName = hostName;
|
||||
this.onionAddress = onionAddress;
|
||||
this.address = address;
|
||||
this.port = port;
|
||||
this.priority = priority == null ? 0 : priority;
|
||||
this.operator = operator;
|
||||
}
|
||||
|
||||
public boolean hasOnionAddress() {
|
||||
return onionAddress != null;
|
||||
}
|
||||
|
||||
public String getHostNameOrAddress() {
|
||||
if (hostName != null)
|
||||
return hostName;
|
||||
else
|
||||
return address;
|
||||
}
|
||||
|
||||
public boolean hasClearNetAddress() {
|
||||
return hostName != null || address != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "onionAddress='" + onionAddress + '\'' +
|
||||
", hostName='" + hostName + '\'' +
|
||||
", address='" + address + '\'' +
|
||||
", port='" + port + '\'' +
|
||||
", priority='" + priority + '\'' +
|
||||
", operator='" + operator;
|
||||
}
|
||||
}
|
||||
}
|
@ -27,15 +27,15 @@ import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class BtcNodesRepository {
|
||||
private final BtcNodeConverter converter;
|
||||
private final List<BtcNodes.BtcNode> nodes;
|
||||
public class XmrNodesRepository {
|
||||
private final XmrNodeConverter converter;
|
||||
private final List<XmrNodes.XmrNode> nodes;
|
||||
|
||||
public BtcNodesRepository(List<BtcNodes.BtcNode> nodes) {
|
||||
this(new BtcNodeConverter(), nodes);
|
||||
public XmrNodesRepository(List<XmrNodes.XmrNode> nodes) {
|
||||
this(new XmrNodeConverter(), nodes);
|
||||
}
|
||||
|
||||
public BtcNodesRepository(BtcNodeConverter converter, List<BtcNodes.BtcNode> nodes) {
|
||||
public XmrNodesRepository(XmrNodeConverter converter, List<XmrNodes.XmrNode> nodes) {
|
||||
this.converter = converter;
|
||||
this.nodes = nodes;
|
||||
}
|
||||
@ -61,21 +61,21 @@ public class BtcNodesRepository {
|
||||
|
||||
private List<PeerAddress> getClearNodes() {
|
||||
return nodes.stream()
|
||||
.filter(BtcNodes.BtcNode::hasClearNetAddress)
|
||||
.filter(XmrNodes.XmrNode::hasClearNetAddress)
|
||||
.flatMap(node -> nullableAsStream(converter.convertClearNode(node)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private List<PeerAddress> getOnionHosts() {
|
||||
return nodes.stream()
|
||||
.filter(BtcNodes.BtcNode::hasOnionAddress)
|
||||
.filter(XmrNodes.XmrNode::hasOnionAddress)
|
||||
.flatMap(node -> nullableAsStream(converter.convertOnionHost(node)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private List<PeerAddress> getClearNodesBehindProxy(Socks5Proxy proxy) {
|
||||
return nodes.stream()
|
||||
.filter(BtcNodes.BtcNode::hasClearNetAddress)
|
||||
.filter(XmrNodes.XmrNode::hasClearNetAddress)
|
||||
.flatMap(node -> nullableAsStream(converter.convertWithTor(node, proxy)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
@ -23,42 +23,41 @@ import haveno.core.user.Preferences;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
public class BtcNodesSetupPreferences {
|
||||
private static final Logger log = LoggerFactory.getLogger(BtcNodesSetupPreferences.class);
|
||||
public class XmrNodesSetupPreferences {
|
||||
private static final Logger log = LoggerFactory.getLogger(XmrNodesSetupPreferences.class);
|
||||
|
||||
private final Preferences preferences;
|
||||
|
||||
public BtcNodesSetupPreferences(Preferences preferences) {
|
||||
public XmrNodesSetupPreferences(Preferences preferences) {
|
||||
this.preferences = preferences;
|
||||
}
|
||||
|
||||
public List<BtcNodes.BtcNode> selectPreferredNodes(BtcNodes nodes) {
|
||||
List<BtcNodes.BtcNode> result;
|
||||
public List<XmrNodes.XmrNode> selectPreferredNodes(XmrNodes nodes) {
|
||||
List<XmrNodes.XmrNode> result;
|
||||
|
||||
BtcNodes.BitcoinNodesOption nodesOption = BtcNodes.BitcoinNodesOption.values()[preferences.getBitcoinNodesOptionOrdinal()];
|
||||
XmrNodes.MoneroNodesOption nodesOption = XmrNodes.MoneroNodesOption.values()[preferences.getMoneroNodesOptionOrdinal()];
|
||||
switch (nodesOption) {
|
||||
case CUSTOM:
|
||||
String bitcoinNodes = preferences.getBitcoinNodes();
|
||||
String bitcoinNodes = preferences.getMoneroNodes();
|
||||
Set<String> distinctNodes = Utilities.commaSeparatedListToSet(bitcoinNodes, false);
|
||||
result = BtcNodes.toBtcNodesList(distinctNodes);
|
||||
result = XmrNodes.toCustomXmrNodesList(distinctNodes);
|
||||
if (result.isEmpty()) {
|
||||
log.warn("Custom nodes is set but no valid nodes are provided. " +
|
||||
"We fall back to provided nodes option.");
|
||||
preferences.setBitcoinNodesOptionOrdinal(BtcNodes.BitcoinNodesOption.PROVIDED.ordinal());
|
||||
result = nodes.getProvidedBtcNodes();
|
||||
preferences.setMoneroNodesOptionOrdinal(XmrNodes.MoneroNodesOption.PROVIDED.ordinal());
|
||||
result = nodes.getAllXmrNodes();
|
||||
}
|
||||
break;
|
||||
case PUBLIC:
|
||||
result = Collections.emptyList();
|
||||
result = nodes.getPublicXmrNodes();
|
||||
break;
|
||||
case PROVIDED:
|
||||
default:
|
||||
result = nodes.getProvidedBtcNodes();
|
||||
result = nodes.getAllXmrNodes();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -66,11 +65,11 @@ public class BtcNodesSetupPreferences {
|
||||
}
|
||||
|
||||
public boolean isUseCustomNodes() {
|
||||
return BtcNodes.BitcoinNodesOption.CUSTOM.ordinal() == preferences.getBitcoinNodesOptionOrdinal();
|
||||
return XmrNodes.MoneroNodesOption.CUSTOM.ordinal() == preferences.getMoneroNodesOptionOrdinal();
|
||||
}
|
||||
|
||||
public int calculateMinBroadcastConnections(List<BtcNodes.BtcNode> nodes) {
|
||||
BtcNodes.BitcoinNodesOption nodesOption = BtcNodes.BitcoinNodesOption.values()[preferences.getBitcoinNodesOptionOrdinal()];
|
||||
public int calculateMinBroadcastConnections(List<XmrNodes.XmrNode> nodes) {
|
||||
XmrNodes.MoneroNodesOption nodesOption = XmrNodes.MoneroNodesOption.values()[preferences.getMoneroNodesOptionOrdinal()];
|
||||
int result;
|
||||
switch (nodesOption) {
|
||||
case CUSTOM:
|
@ -33,11 +33,11 @@ import haveno.core.user.Preferences;
|
||||
import haveno.core.xmr.exceptions.InvalidHostException;
|
||||
import haveno.core.xmr.model.AddressEntry;
|
||||
import haveno.core.xmr.model.AddressEntryList;
|
||||
import haveno.core.xmr.nodes.BtcNetworkConfig;
|
||||
import haveno.core.xmr.nodes.BtcNodes;
|
||||
import haveno.core.xmr.nodes.BtcNodes.BtcNode;
|
||||
import haveno.core.xmr.nodes.BtcNodesRepository;
|
||||
import haveno.core.xmr.nodes.BtcNodesSetupPreferences;
|
||||
import haveno.core.xmr.nodes.XmrNetworkConfig;
|
||||
import haveno.core.xmr.nodes.XmrNodes;
|
||||
import haveno.core.xmr.nodes.XmrNodes.XmrNode;
|
||||
import haveno.core.xmr.nodes.XmrNodesRepository;
|
||||
import haveno.core.xmr.nodes.XmrNodesSetupPreferences;
|
||||
import haveno.core.xmr.nodes.LocalBitcoinNode;
|
||||
import haveno.network.Socks5MultiDiscovery;
|
||||
import haveno.network.Socks5ProxyProvider;
|
||||
@ -101,7 +101,7 @@ public class WalletsSetup {
|
||||
private final Socks5ProxyProvider socks5ProxyProvider;
|
||||
private final Config config;
|
||||
private final LocalBitcoinNode localBitcoinNode;
|
||||
private final BtcNodes btcNodes;
|
||||
private final XmrNodes xmrNodes;
|
||||
private final int numConnectionsForBtc;
|
||||
private final String userAgent;
|
||||
private final NetworkParameters params;
|
||||
@ -127,7 +127,7 @@ public class WalletsSetup {
|
||||
Socks5ProxyProvider socks5ProxyProvider,
|
||||
Config config,
|
||||
LocalBitcoinNode localBitcoinNode,
|
||||
BtcNodes btcNodes,
|
||||
XmrNodes xmrNodes,
|
||||
@Named(Config.USER_AGENT) String userAgent,
|
||||
@Named(Config.WALLET_DIR) File walletDir,
|
||||
@Named(Config.USE_ALL_PROVIDED_NODES) boolean useAllProvidedNodes,
|
||||
@ -139,7 +139,7 @@ public class WalletsSetup {
|
||||
this.socks5ProxyProvider = socks5ProxyProvider;
|
||||
this.config = config;
|
||||
this.localBitcoinNode = localBitcoinNode;
|
||||
this.btcNodes = btcNodes;
|
||||
this.xmrNodes = xmrNodes;
|
||||
this.numConnectionsForBtc = numConnectionsForBtc;
|
||||
this.useAllProvidedNodes = useAllProvidedNodes;
|
||||
this.userAgent = userAgent;
|
||||
@ -171,7 +171,7 @@ public class WalletsSetup {
|
||||
|
||||
backupWallets();
|
||||
|
||||
final Socks5Proxy socks5Proxy = preferences.getUseTorForBitcoinJ() ? socks5ProxyProvider.getSocks5Proxy() : null;
|
||||
final Socks5Proxy socks5Proxy = preferences.getUseTorForMonero() ? socks5ProxyProvider.getSocks5Proxy() : null;
|
||||
log.info("Socks5Proxy for bitcoinj: socks5Proxy=" + socks5Proxy);
|
||||
|
||||
walletConfig = new WalletConfig(params, walletDir, "haveno") {
|
||||
@ -195,7 +195,7 @@ public class WalletsSetup {
|
||||
};
|
||||
walletConfig.setSocks5Proxy(socks5Proxy);
|
||||
walletConfig.setConfig(config);
|
||||
walletConfig.setLocalBitcoinNode(localBitcoinNode);
|
||||
walletConfig.setLocalBitcoinNode(localBitcoinNode); // TODO: adapt to xmr or remove
|
||||
walletConfig.setUserAgent(userAgent, Version.VERSION);
|
||||
walletConfig.setNumConnectionsForBtc(numConnectionsForBtc);
|
||||
|
||||
@ -213,7 +213,7 @@ public class WalletsSetup {
|
||||
walletConfig.setCheckpoints(getClass().getResourceAsStream(checkpointsPath));
|
||||
}
|
||||
|
||||
|
||||
// TODO: update this for xmr
|
||||
if (params.getId().equals(NetworkParameters.ID_REGTEST)) {
|
||||
walletConfig.setMinBroadcastConnections(1);
|
||||
if (regTestHost == RegTestHost.LOCALHOST) {
|
||||
@ -235,7 +235,7 @@ public class WalletsSetup {
|
||||
walletConfig.connectToLocalHost();
|
||||
} else {
|
||||
try {
|
||||
configPeerNodes(socks5Proxy);
|
||||
//configPeerNodes(socks5Proxy);
|
||||
} catch (IllegalArgumentException e) {
|
||||
timeoutTimer.stop();
|
||||
walletsSetupFailed.set(true);
|
||||
@ -329,14 +329,14 @@ public class WalletsSetup {
|
||||
private void configPeerNodes(@Nullable Socks5Proxy proxy) {
|
||||
walletConfig.setMinBroadcastConnections(MIN_BROADCAST_CONNECTIONS);
|
||||
|
||||
BtcNodesSetupPreferences btcNodesSetupPreferences = new BtcNodesSetupPreferences(preferences);
|
||||
List<BtcNode> nodes = btcNodesSetupPreferences.selectPreferredNodes(btcNodes);
|
||||
XmrNodesSetupPreferences xmrNodesSetupPreferences = new XmrNodesSetupPreferences(preferences);
|
||||
List<XmrNode> nodes = xmrNodesSetupPreferences.selectPreferredNodes(xmrNodes);
|
||||
|
||||
BtcNodesRepository repository = new BtcNodesRepository(nodes);
|
||||
boolean isUseClearNodesWithProxies = (useAllProvidedNodes || btcNodesSetupPreferences.isUseCustomNodes());
|
||||
XmrNodesRepository repository = new XmrNodesRepository(nodes);
|
||||
boolean isUseClearNodesWithProxies = (useAllProvidedNodes || xmrNodesSetupPreferences.isUseCustomNodes());
|
||||
List<PeerAddress> peers = repository.getPeerAddresses(proxy, isUseClearNodesWithProxies);
|
||||
|
||||
BtcNetworkConfig networkConfig = new BtcNetworkConfig(walletConfig, params, socks5DiscoverMode, proxy);
|
||||
XmrNetworkConfig networkConfig = new XmrNetworkConfig(walletConfig, params, socks5DiscoverMode, proxy);
|
||||
networkConfig.proposePeers(peers);
|
||||
}
|
||||
|
||||
|
@ -626,6 +626,8 @@ public class XmrWalletService {
|
||||
// sync wallet if open
|
||||
if (wallet != null) {
|
||||
log.info("Monero wallet uri={}, path={}", wallet.getRpcConnection().getUri(), wallet.getPath());
|
||||
int numAttempts = 0;
|
||||
int maxAttempts = 2;
|
||||
while (!HavenoUtils.havenoSetup.getWalletInitialized().get()) {
|
||||
try {
|
||||
|
||||
@ -648,8 +650,17 @@ public class XmrWalletService {
|
||||
// save but skip backup on initialization
|
||||
saveMainWallet(false);
|
||||
} catch (Exception e) {
|
||||
log.warn("Error syncing main wallet: {}. Trying again in {} seconds", e.getMessage(), connectionsService.getRefreshPeriodMs() / 1000);
|
||||
GenUtils.waitFor(connectionsService.getRefreshPeriodMs());
|
||||
log.warn("Error syncing main wallet: {}", e.getMessage());
|
||||
numAttempts++;
|
||||
if (numAttempts < maxAttempts) {
|
||||
log.warn("Trying again in {} seconds", connectionsService.getRefreshPeriodMs() / 1000);
|
||||
GenUtils.waitFor(connectionsService.getRefreshPeriodMs());
|
||||
} else {
|
||||
log.warn("Failed to sync main wallet after {} attempts. Opening app without syncing", maxAttempts);
|
||||
HavenoUtils.havenoSetup.getWalletInitialized().set(true);
|
||||
saveMainWallet(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -735,9 +746,10 @@ public class XmrWalletService {
|
||||
if (connection != null) {
|
||||
cmd.add("--daemon-address");
|
||||
cmd.add(connection.getUri());
|
||||
if (connection.isOnion() && connection.getProxyUri() != null) {
|
||||
if (connection.getProxyUri() != null) {
|
||||
cmd.add("--proxy");
|
||||
cmd.add(connection.getProxyUri());
|
||||
if (!connection.isOnion()) cmd.add("--daemon-ssl-allow-any-cert"); // necessary to use proxy with clearnet mmonerod
|
||||
}
|
||||
if (connection.getUsername() != null) {
|
||||
cmd.add("--daemon-login");
|
||||
@ -1015,10 +1027,10 @@ public class XmrWalletService {
|
||||
|
||||
public List<MoneroTxWallet> getTxsWithIncomingOutputs(Integer subaddressIndex) {
|
||||
List<MoneroTxWallet> txs = wallet.getTxs(new MoneroTxQuery().setIncludeOutputs(true));
|
||||
return getTxsWithIncomingOutputs(txs, subaddressIndex);
|
||||
return getTxsWithIncomingOutputs(subaddressIndex, txs);
|
||||
}
|
||||
|
||||
public static List<MoneroTxWallet> getTxsWithIncomingOutputs(List<MoneroTxWallet> txs, Integer subaddressIndex) {
|
||||
public static List<MoneroTxWallet> getTxsWithIncomingOutputs(Integer subaddressIndex, List<MoneroTxWallet> txs) {
|
||||
List<MoneroTxWallet> incomingTxs = new ArrayList<>();
|
||||
for (MoneroTxWallet tx : txs) {
|
||||
boolean isIncoming = false;
|
||||
|
@ -21,7 +21,7 @@ grant {
|
||||
permission "java.util.PropertyPermission" "useragent.name", "read";
|
||||
permission "java.util.PropertyPermission" "useragent.version", "read";
|
||||
permission "java.util.PropertyPermission" "walletDir", "read";
|
||||
permission "java.util.PropertyPermission" "useTorForBtc", "read";
|
||||
permission "java.util.PropertyPermission" "useTorForXmr", "read";
|
||||
permission "java.util.PropertyPermission" "providers", "read";
|
||||
permission "java.util.PropertyPermission" "rpcUser", "read";
|
||||
permission "java.util.PropertyPermission" "rpcPassword", "read";
|
||||
@ -38,7 +38,7 @@ grant {
|
||||
permission "java.util.PropertyPermission" "nodePort", "read";
|
||||
permission "java.util.PropertyPermission" "seedNodes", "read";
|
||||
permission "java.util.PropertyPermission" "bitcoinRegtestHost", "read";
|
||||
permission "java.util.PropertyPermission" "btcNodes", "read";
|
||||
permission "java.util.PropertyPermission" "xmrNodes", "read";
|
||||
permission "java.util.PropertyPermission" "appName", "read";
|
||||
permission "java.util.PropertyPermission" "socks5DiscoverMode", "read";
|
||||
permission "java.util.PropertyPermission" "priceFeedProviders", "read";
|
||||
@ -69,7 +69,7 @@ grant {
|
||||
permission "java.lang.RuntimePermission" "getenv.useragent.name";
|
||||
permission "java.lang.RuntimePermission" "getenv.useragent.version";
|
||||
permission "java.lang.RuntimePermission" "getenv.walletDir";
|
||||
permission "java.lang.RuntimePermission" "getenv.useTorForBtc";
|
||||
permission "java.lang.RuntimePermission" "getenv.useTorForXmr";
|
||||
permission "java.lang.RuntimePermission" "getenv.providers";
|
||||
permission "java.lang.RuntimePermission" "getenv.rpcPassword";
|
||||
permission "java.lang.RuntimePermission" "getenv.rpcUser";
|
||||
@ -84,7 +84,7 @@ grant {
|
||||
permission "java.lang.RuntimePermission" "getenv.priceFeedProviders";
|
||||
permission "java.lang.RuntimePermission" "getenv.seedNodes";
|
||||
permission "java.lang.RuntimePermission" "getenv.bitcoinRegtestHost";
|
||||
permission "java.lang.RuntimePermission" "getenv.btcNodes";
|
||||
permission "java.lang.RuntimePermission" "getenv.xmrNodes";
|
||||
permission "java.lang.RuntimePermission" "getenv.maxMemory";
|
||||
permission "java.lang.RuntimePermission" "getClassLoader";
|
||||
permission "java.lang.RuntimePermission" "accessUserInformation";
|
||||
|
@ -1274,25 +1274,23 @@ settings.preferences.editCustomExplorer.addressUrl=Address URL
|
||||
settings.net.btcHeader=Monero network
|
||||
settings.net.p2pHeader=Haveno network
|
||||
settings.net.onionAddressLabel=My onion address
|
||||
settings.net.btcNodesLabel=Use custom Monero Core nodes
|
||||
settings.net.bitcoinPeersLabel=Connected peers
|
||||
settings.net.useTorForBtcJLabel=Use Tor for Monero network
|
||||
settings.net.bitcoinNodesLabel=Monero Core nodes to connect to
|
||||
settings.net.useProvidedNodesRadio=Use provided Monero Core nodes
|
||||
settings.net.xmrNodesLabel=Use custom Monero nodes
|
||||
settings.net.moneroPeersLabel=Connected peers
|
||||
settings.net.useTorForXmrJLabel=Use Tor for Monero network
|
||||
settings.net.moneroNodesLabel=Monero nodes to connect to
|
||||
settings.net.useProvidedNodesRadio=Use provided Monero nodes
|
||||
settings.net.usePublicNodesRadio=Use public Monero network
|
||||
settings.net.useCustomNodesRadio=Use custom Monero Core nodes
|
||||
settings.net.warn.usePublicNodes=If you use the public Monero network you are exposed to a severe privacy problem caused by the broken bloom filter design and implementation which is used for SPV wallets like BitcoinJ (used in Haveno). Any full node you are connected to could find out that all your wallet addresses belong to one entity.\n\n\
|
||||
Please read more about the details at [HYPERLINK:https://bisq.network/blog/privacy-in-bitsquare].\n\n\
|
||||
Are you sure you want to use the public nodes?
|
||||
settings.net.useCustomNodesRadio=Use custom Monero nodes
|
||||
settings.net.warn.usePublicNodes=If you use public Monero nodes, you are subject to any risk of using untrusted remote nodes.\n\nPlease read more details at [HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html].\n\nAre you sure you want to use public nodes?
|
||||
settings.net.warn.usePublicNodes.useProvided=No, use provided nodes
|
||||
settings.net.warn.usePublicNodes.usePublic=Yes, use public network
|
||||
settings.net.warn.useCustomNodes.B2XWarning=Please be sure that your Monero node is a trusted Monero Core node!\n\n\
|
||||
Connecting to nodes which do not follow the Monero Core consensus rules could corrupt your wallet and cause problems in the trade process.\n\n\
|
||||
settings.net.warn.useCustomNodes.B2XWarning=Please be sure that your Monero node is a trusted Monero node!\n\n\
|
||||
Connecting to nodes which do not follow the Monero consensus rules could corrupt your wallet and cause problems in the trade process.\n\n\
|
||||
Users who connect to nodes that violate consensus rules are responsible for any resulting damage. \
|
||||
Any resulting disputes will be decided in favor of the other peer. No technical support will be given \
|
||||
to users who ignore this warning and protection mechanisms!
|
||||
settings.net.warn.invalidBtcConfig=Connection to the Monero network failed because your configuration is invalid.\n\nYour configuration has been reset to use the provided Monero nodes instead. You will need to restart the application.
|
||||
settings.net.localhostBtcNodeInfo=Background information: Haveno looks for a local Monero node when starting. If it is found, Haveno will communicate with the Monero network exclusively through it.
|
||||
settings.net.localhostXmrNodeInfo=Background information: Haveno looks for a local Monero node when starting. If it is found, Haveno will communicate with the Monero network exclusively through it.
|
||||
settings.net.p2PPeersLabel=Connected peers
|
||||
settings.net.onionAddressColumn=Onion address
|
||||
settings.net.creationDateColumn=Established
|
||||
@ -1916,7 +1914,7 @@ filterWindow.mediators=Filtered mediators (comma sep. onion addresses)
|
||||
filterWindow.refundAgents=Filtered refund agents (comma sep. onion addresses)
|
||||
filterWindow.seedNode=Filtered seed nodes (comma sep. onion addresses)
|
||||
filterWindow.priceRelayNode=Filtered price relay nodes (comma sep. onion addresses)
|
||||
filterWindow.btcNode=Filtered Monero nodes (comma sep. addresses + port)
|
||||
filterWindow.xmrNode=Filtered Monero nodes (comma sep. addresses + port)
|
||||
filterWindow.preventPublicBtcNetwork=Prevent usage of public Monero network
|
||||
filterWindow.disableAutoConf=Disable auto-confirm
|
||||
filterWindow.autoConfExplorers=Filtered auto-confirm explorers (comma sep. addresses)
|
||||
|
@ -1024,19 +1024,19 @@ settings.preferences.editCustomExplorer.addressUrl=Adresa URL
|
||||
settings.net.btcHeader=Bitcoinová síť
|
||||
settings.net.p2pHeader=Síť Haveno
|
||||
settings.net.onionAddressLabel=Moje onion adresa
|
||||
settings.net.btcNodesLabel=Použijte vlastní Bitcoin Core node
|
||||
settings.net.bitcoinPeersLabel=Připojené peer uzly
|
||||
settings.net.useTorForBtcJLabel=Použít Tor pro Bitcoinovou síť
|
||||
settings.net.bitcoinNodesLabel=Bitcoin Core nody, pro připojení
|
||||
settings.net.xmrNodesLabel=Použijte vlastní Monero node
|
||||
settings.net.moneroPeersLabel=Připojené peer uzly
|
||||
settings.net.useTorForXmrJLabel=Použít Tor pro Monero síť
|
||||
settings.net.moneroNodesLabel=Monero nody, pro připojení
|
||||
settings.net.useProvidedNodesRadio=Použijte nabízené Bitcoin Core nody
|
||||
settings.net.usePublicNodesRadio=Použít veřejnou Bitcoinovou síť
|
||||
settings.net.useCustomNodesRadio=Použijte vlastní Bitcoin Core node
|
||||
settings.net.warn.usePublicNodes=Používáte-li veřejnou bitcoinovou síť, jste vystaveni závažnému problému s ochranou soukromí způsobenému porušením návrhu a implementace bloom filtru, který se používá pro peněženky SPV, jako je BitcoinJ (použitý v Haveno). Každý full node, ke kterému jste připojeni, mohl zjistit, že všechny vaše adresy peněženky patří jedné entitě.\n\nPřečtěte si více o podrobnostech na adrese: [HYPERLINK:https://bisq.network/blog/privacy-in-bitsquare].\n\nOpravdu chcete použít veřejné nody?
|
||||
settings.net.warn.usePublicNodes=Pokud používáte veřejné Monero nody, jste vystaveni riziku spojenému s používáním nedůvěryhodných vzdálených nodů.\n\nProsím, přečtěte si více podrobností na [HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html].\n\nJste si jistí, že chcete použít veřejné nody?
|
||||
settings.net.warn.usePublicNodes.useProvided=Ne, použijte nabízené nody
|
||||
settings.net.warn.usePublicNodes.usePublic=Ano, použít veřejnou síť
|
||||
settings.net.warn.useCustomNodes.B2XWarning=Ujistěte se, že váš bitcoinový node je důvěryhodný Bitcoin Core node!\n\nPřipojení k nodům, které nedodržují pravidla konsensu Bitcoin Core, může poškodit vaši peněženku a způsobit problémy v obchodním procesu.\n\nUživatelé, kteří se připojují k nodům, které porušují pravidla konsensu, odpovídají za případné škody, které z toho vyplývají. Jakékoli výsledné spory budou rozhodnuty ve prospěch druhého obchodníka. Uživatelům, kteří ignorují tyto varovné a ochranné mechanismy, nebude poskytována technická podpora!
|
||||
settings.net.warn.invalidBtcConfig=Připojení k bitcoinové síti selhalo, protože je vaše konfigurace neplatná.\n\nVaše konfigurace byla resetována, aby se místo toho použily poskytnuté bitcoinové uzly. Budete muset restartovat aplikaci.
|
||||
settings.net.localhostBtcNodeInfo=Základní informace: Haveno při spuštění hledá místní Bitcoinový uzel. Pokud je nalezen, Haveno bude komunikovat se sítí Bitcoin výhradně skrze něj.
|
||||
settings.net.localhostXmrNodeInfo=Základní informace: Haveno při spuštění hledá místní Bitcoinový uzel. Pokud je nalezen, Haveno bude komunikovat se sítí Bitcoin výhradně skrze něj.
|
||||
settings.net.p2PPeersLabel=Připojené uzly
|
||||
settings.net.onionAddressColumn=Onion adresa
|
||||
settings.net.creationDateColumn=Založeno
|
||||
@ -1425,7 +1425,7 @@ filterWindow.mediators=Filtrovaní mediátoři (onion adresy oddělené čárkam
|
||||
filterWindow.refundAgents=Filtrovaní rozhodci pro vrácení peněz (onion adresy oddělené čárkami)
|
||||
filterWindow.seedNode=Filtrované seed nody (onion adresy oddělené čárkami)
|
||||
filterWindow.priceRelayNode=Filtrované cenové relay nody (onion adresy oddělené čárkami)
|
||||
filterWindow.btcNode=Filtrované Bitcoinové nody (adresy+porty oddělené čárkami)
|
||||
filterWindow.xmrNode=Filtrované Bitcoinové nody (adresy+porty oddělené čárkami)
|
||||
filterWindow.preventPublicBtcNetwork=Zabraňte použití veřejné bitcoinové sítě
|
||||
filterWindow.disableAutoConf=Zakázat automatické potvrzení
|
||||
filterWindow.autoConfExplorers=Filtrované průzkumníky s automatickým potvrzením (adresy oddělené čárkami)
|
||||
|
@ -1024,19 +1024,19 @@ settings.preferences.editCustomExplorer.addressUrl=Adress-URL
|
||||
settings.net.btcHeader=Bitcoin-Netzwerk
|
||||
settings.net.p2pHeader=Haveno-Netzwerk
|
||||
settings.net.onionAddressLabel=Meine Onion-Adresse
|
||||
settings.net.btcNodesLabel=Spezifische Bitcoin-Core-Knoten verwenden
|
||||
settings.net.bitcoinPeersLabel=Verbundene Peers
|
||||
settings.net.useTorForBtcJLabel=Tor für das Bitcoin-Netzwerk verwenden
|
||||
settings.net.bitcoinNodesLabel=Mit Bitcoin-Core-Knoten verbinden
|
||||
settings.net.xmrNodesLabel=Spezifische Monero-Knoten verwenden
|
||||
settings.net.moneroPeersLabel=Verbundene Peers
|
||||
settings.net.useTorForXmrJLabel=Tor für das Monero-Netzwerk verwenden
|
||||
settings.net.moneroNodesLabel=Mit Monero-Knoten verbinden
|
||||
settings.net.useProvidedNodesRadio=Bereitgestellte Bitcoin-Core-Knoten verwenden
|
||||
settings.net.usePublicNodesRadio=Öffentliches Bitcoin-Netzwerk benutzen
|
||||
settings.net.useCustomNodesRadio=Spezifische Bitcoin-Core-Knoten verwenden
|
||||
settings.net.warn.usePublicNodes=Wenn Sie das öffentliche Bitcoin Netzwerk verwenden, sind Sie den Privatsphäre-Probleme die durch das defekte Bloom Filter Design, das von SPV wallets wie BitcoinJ (verwendet von Haveno) verwendet wird, ausgesetzt. Jede Full Node mit der Sie sich verbinden könnte dadurch alle Adressen, die zu einer Entität gehören, herausfinden.\n\nWeitere Informationen finden Sie unter [HYPERLINK:https://bisq.network/blog/privacy-in-bitsquare].\n\nSind Sie sicher, dass Sie die öffentlichen Nodes verwenden wollen?
|
||||
settings.net.warn.usePublicNodes=Wenn Sie öffentliche Monero-Nodes verwenden, sind Sie den Risiken ausgesetzt, die mit der Verwendung unvertrauenswürdiger Remote-Nodes verbunden sind.\n\nBitte lesen Sie weitere Details unter [HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html].\n\nSind Sie sich sicher, dass Sie öffentliche Nodes verwenden möchten?
|
||||
settings.net.warn.usePublicNodes.useProvided=Nein, bereitgestellte Knoten verwenden
|
||||
settings.net.warn.usePublicNodes.usePublic=Ja, öffentliches Netzwerk verwenden
|
||||
settings.net.warn.useCustomNodes.B2XWarning=Bitte stellen Sie sicher, dass Sie sich mit einem vertrauenswürdigen Bitcoin-Core-Knoten verbinden!\n\nWenn Sie sich mit Knoten verbinden, die gegen die Bitcoin Core Konsensus-Regeln verstoßen, kann es zu Problemen in Ihrer Wallet und im Verlauf des Handelsprozesses kommen.\n\nBenutzer die sich zu oben genannten Knoten verbinden, sind für den verursachten Schaden verantwortlich. Dadurch entstandene Konflikte werden zugunsten des anderen Teilnehmers entschieden. Benutzer die unsere Warnungen und Sicherheitsmechanismen ignorieren wird keine technische Unterstützung geleistet!
|
||||
settings.net.warn.invalidBtcConfig=Die Verbindung zum Bitcoin-Netzwerk ist fehlgeschlagen, weil Ihre Konfiguration ungültig ist.\n\nIhre Konfiguration wurde zurückgesetzt, um stattdessen die bereitgestellten Bitcoin-Nodes zu verwenden. Sie müssen die Anwendung neu starten.
|
||||
settings.net.localhostBtcNodeInfo=Hintergrundinformationen: Haveno sucht beim Start nach einem lokalen Bitcoin-Node. Wird dieser gefunden, kommuniziert Haveno ausschließlich über diesen mit dem Bitcoin-Netzwerk.
|
||||
settings.net.localhostXmrNodeInfo=Hintergrundinformationen: Haveno sucht beim Start nach einem lokalen Bitcoin-Node. Wird dieser gefunden, kommuniziert Haveno ausschließlich über diesen mit dem Bitcoin-Netzwerk.
|
||||
settings.net.p2PPeersLabel=Verbundene Peers
|
||||
settings.net.onionAddressColumn=Onion-Adresse
|
||||
settings.net.creationDateColumn=Eingerichtet
|
||||
@ -1425,7 +1425,7 @@ filterWindow.mediators=Gefilterte Mediatoren (mit Komma getr. Onion-Adressen)
|
||||
filterWindow.refundAgents=Gefilterte Rückerstattungsagenten (mit Komma getr. Onion-Adressen)
|
||||
filterWindow.seedNode=Gefilterte Seed-Knoten (Komma getr. Onion-Adressen)
|
||||
filterWindow.priceRelayNode=Gefilterte Preisrelais Knoten (Komma getr. Onion-Adressen)
|
||||
filterWindow.btcNode=Gefilterte Bitcoinknoten (Komma getr. Adresse + Port)
|
||||
filterWindow.xmrNode=Gefilterte Bitcoinknoten (Komma getr. Adresse + Port)
|
||||
filterWindow.preventPublicBtcNetwork=Nutzung des öffentlichen Bitcoin-Netzwerks verhindern
|
||||
filterWindow.disableAutoConf=Automatische Bestätigung deaktivieren
|
||||
filterWindow.autoConfExplorers=Gefilterter Explorer mit Auto-Bestätigung (Adressen mit Komma separiert)
|
||||
|
@ -1024,19 +1024,19 @@ settings.preferences.editCustomExplorer.addressUrl=URL de la dirección
|
||||
settings.net.btcHeader=Red Bitcoin
|
||||
settings.net.p2pHeader=Red Haveno
|
||||
settings.net.onionAddressLabel=Mi dirección onion
|
||||
settings.net.btcNodesLabel=Utilizar nodos Bitcoin Core personalizados
|
||||
settings.net.bitcoinPeersLabel=Pares conectados
|
||||
settings.net.useTorForBtcJLabel=Usar Tor para la red Bitcoin
|
||||
settings.net.bitcoinNodesLabel=Nodos Bitcoin Core para conectarse
|
||||
settings.net.xmrNodesLabel=Utilizar nodos Monero personalizados
|
||||
settings.net.moneroPeersLabel=Pares conectados
|
||||
settings.net.useTorForXmrJLabel=Usar Tor para la red Monero
|
||||
settings.net.moneroNodesLabel=Nodos Monero para conectarse
|
||||
settings.net.useProvidedNodesRadio=Utilizar nodos Bitcoin Core proporcionados
|
||||
settings.net.usePublicNodesRadio=Utilizar red pública Bitcoin
|
||||
settings.net.useCustomNodesRadio=Utilizar nodos Bitcoin Core personalizados
|
||||
settings.net.warn.usePublicNodes=Si usa la red pública de Bitcoin está expuesto a problemas de privacidad causados por el fallo en el diseño y la implementación del filtro bloom que se utiliza para carteras SPV como BitcoinJ (usado en Haveno). Cualquier nodo completo al que esté conectado podría conocer que todas las direcciones del monedero pertenecen a una entidad.\n\nPor favor, lea más sobre los detalles en: [HYPERLINK:https://bisq.network/blog/privacy-in-bitsquare].\n\n¿Está seguro de que quiere utilizar los nodos públicos?
|
||||
settings.net.warn.usePublicNodes=Si utiliza nodos públicos de Monero, está sujeto a cualquier riesgo asociado con el uso de nodos remotos no confiables.\n\nPor favor, lea más detalles en [HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html].\n\n¿Está seguro de que desea utilizar nodos públicos?
|
||||
settings.net.warn.usePublicNodes.useProvided=No, utilizar nodos proporcionados
|
||||
settings.net.warn.usePublicNodes.usePublic=Sí, utilizar la red pública
|
||||
settings.net.warn.useCustomNodes.B2XWarning=¡Por favor, asegúrese de que su nodo Bitcoin es un nodo de confianza Bitcoin Core!\n\nConectar a nodos que no siguen las reglas de consenso puede causar perjuicios a su cartera y causar problemas en el proceso de intercambio.\n\nLos usuarios que se conecten a los nodos que violan las reglas de consenso son responsables de cualquier daño que estos creen. Las disputas causadas por ello se decidirán en favor del otro participante. No se dará soporte técnico a usuarios que ignoren esta advertencia y los mecanismos de protección!
|
||||
settings.net.warn.invalidBtcConfig=La conexión a la red Bitcoin falló debido a que su configuración es inválida.\n\nSu configuración se ha reestablecido para usar los nodos Bitcoin proporcionados. Necesitará reiniciar la aplicación.
|
||||
settings.net.localhostBtcNodeInfo=Información complementaria: Haveno busca un nodo local Bitcoin al inicio. Si lo encuentra, Haveno se comunicará a la red Bitcoin exclusivamente a través de él.
|
||||
settings.net.localhostXmrNodeInfo=Información complementaria: Haveno busca un nodo local Bitcoin al inicio. Si lo encuentra, Haveno se comunicará a la red Bitcoin exclusivamente a través de él.
|
||||
settings.net.p2PPeersLabel=Pares conectados
|
||||
settings.net.onionAddressColumn=Dirección onion
|
||||
settings.net.creationDateColumn=Establecido
|
||||
@ -1425,7 +1425,7 @@ filterWindow.mediators=Mediadores filtrados (direcciones onion separadas por com
|
||||
filterWindow.refundAgents=Agentes de devolución de fondos filtrados (direcciones onion separadas por coma)
|
||||
filterWindow.seedNode=Nodos semilla filtrados (direcciones onion separadas por coma)
|
||||
filterWindow.priceRelayNode=nodos de retransmisión de precio filtrados (direcciones onion separadas por coma)
|
||||
filterWindow.btcNode=Nodos Bitcoin filtrados (direcciones + puerto separadas por coma)
|
||||
filterWindow.xmrNode=Nodos Bitcoin filtrados (direcciones + puerto separadas por coma)
|
||||
filterWindow.preventPublicBtcNetwork=Prevenir uso de la red Bitcoin pública
|
||||
filterWindow.disableAutoConf=Deshabilitar autoconfirmación
|
||||
filterWindow.autoConfExplorers=Exploradores de autoconfirmación filtrados (direcciones separadas por coma)
|
||||
|
@ -1024,19 +1024,19 @@ settings.preferences.editCustomExplorer.addressUrl=Address URL
|
||||
settings.net.btcHeader=شبکه بیتکوین
|
||||
settings.net.p2pHeader=Haveno network
|
||||
settings.net.onionAddressLabel=آدرس onion من
|
||||
settings.net.btcNodesLabel=استفاده از گرههای Bitcoin Core اختصاصی
|
||||
settings.net.bitcoinPeersLabel=همتایان متصل
|
||||
settings.net.useTorForBtcJLabel=استفاده از Tor برای شبکه بیتکوین
|
||||
settings.net.bitcoinNodesLabel=گرههای Bitcoin Core در دسترس
|
||||
settings.net.xmrNodesLabel=استفاده از گرههای Monero اختصاصی
|
||||
settings.net.moneroPeersLabel=همتایان متصل
|
||||
settings.net.useTorForXmrJLabel=استفاده از Tor برای شبکه مونرو
|
||||
settings.net.moneroNodesLabel=گرههای Monero در دسترس
|
||||
settings.net.useProvidedNodesRadio=استفاده از نودهای بیتکوین ارائه شده
|
||||
settings.net.usePublicNodesRadio=استفاده از شبکه بیتکوین عمومی
|
||||
settings.net.useCustomNodesRadio=استفاده از نودهای بیتکوین اختصاصی
|
||||
settings.net.warn.usePublicNodes=If you use the public Bitcoin network you are exposed to a severe privacy problem caused by the broken bloom filter design and implementation which is used for SPV wallets like BitcoinJ (used in Haveno). Any full node you are connected to could find out that all your wallet addresses belong to one entity.\n\nPlease read more about the details at [HYPERLINK:https://bisq.network/blog/privacy-in-bitsquare].\n\nAre you sure you want to use the public nodes?
|
||||
settings.net.warn.usePublicNodes=If you use public Monero nodes, you are subject to any risk of using untrusted remote nodes.\n\nPlease read more details at [HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html].\n\nAre you sure you want to use public nodes?
|
||||
settings.net.warn.usePublicNodes.useProvided=خیر، از نودهای فراهم شده استفاده کنید.
|
||||
settings.net.warn.usePublicNodes.usePublic=بلی، از شبکه عمومی استفاده کنید.
|
||||
settings.net.warn.useCustomNodes.B2XWarning=لطفا مطمئن شوید که گره بیتکوین شما یک گره مورد اعتماد Bitcoin Core است!\n\nمتصل شدن به گرههایی که از قوانین مورد اجماع موجود در Bitcoin Core پیروی نمیکنند میتواند باعث خراب شدن کیف پول شما شود و در فرآیند معامله مشکلاتی را به وجود بیاورد.\n\nکاربرانی که از گرههای ناقض قوانین مورد اجماع استفاده میکند مسئول هر گونه آسیب ایجاد شده هستند. اگر هر گونه اختلافی به وجود بیاید به نفع دیگر گرههایی که از قوانین مورد اجماع پیروی میکنند درمورد آن تصمیم گیری خواهد شد. به کاربرانی که این هشدار و سازوکار محافظتی را نادیده میگیرند هیچگونه پشتیبانی فنی ارائه نخواهد شد!
|
||||
settings.net.warn.invalidBtcConfig=Connection to the Bitcoin network failed because your configuration is invalid.\n\nYour configuration has been reset to use the provided Bitcoin nodes instead. You will need to restart the application.
|
||||
settings.net.localhostBtcNodeInfo=Background information: Haveno looks for a local Bitcoin node when starting. If it is found, Haveno will communicate with the Bitcoin network exclusively through it.
|
||||
settings.net.localhostXmrNodeInfo=Background information: Haveno looks for a local Bitcoin node when starting. If it is found, Haveno will communicate with the Bitcoin network exclusively through it.
|
||||
settings.net.p2PPeersLabel=همتایان متصل
|
||||
settings.net.onionAddressColumn=آدرس Onion
|
||||
settings.net.creationDateColumn=تثبیت شده
|
||||
@ -1425,7 +1425,7 @@ filterWindow.mediators=Filtered mediators (comma sep. onion addresses)
|
||||
filterWindow.refundAgents=Filtered refund agents (comma sep. onion addresses)
|
||||
filterWindow.seedNode=گره های seed فیلتر شده (آدرس های Onion جدا شده با ویرگول)
|
||||
filterWindow.priceRelayNode=گره های رله قیمت فیلترشده (آدرس های Onion جدا شده با ویرگول)
|
||||
filterWindow.btcNode=گرههای بیتکوین فیلترشده (آدرس + پورت جدا شده با ویرگول)
|
||||
filterWindow.xmrNode=گرههای بیتکوین فیلترشده (آدرس + پورت جدا شده با ویرگول)
|
||||
filterWindow.preventPublicBtcNetwork=جلوگیری از استفاده ازشبکه عمومی بیتکوین
|
||||
filterWindow.disableAutoConf=Disable auto-confirm
|
||||
filterWindow.autoConfExplorers=Filtered auto-confirm explorers (comma sep. addresses)
|
||||
|
@ -1025,19 +1025,19 @@ settings.preferences.editCustomExplorer.addressUrl=Addresse URL
|
||||
settings.net.btcHeader=Réseau Bitcoin
|
||||
settings.net.p2pHeader=Le réseau Haveno
|
||||
settings.net.onionAddressLabel=Mon adresse onion
|
||||
settings.net.btcNodesLabel=Utiliser des nœuds Bitcoin Core personnalisés
|
||||
settings.net.bitcoinPeersLabel=Pairs connectés
|
||||
settings.net.useTorForBtcJLabel=Utiliser Tor pour le réseau Bitcoin
|
||||
settings.net.bitcoinNodesLabel=Nœuds Bitcoin Core pour se connecter à
|
||||
settings.net.xmrNodesLabel=Utiliser des nœuds Monero personnalisés
|
||||
settings.net.moneroPeersLabel=Pairs connectés
|
||||
settings.net.useTorForXmrJLabel=Utiliser Tor pour le réseau Monero
|
||||
settings.net.moneroNodesLabel=Nœuds Monero pour se connecter à
|
||||
settings.net.useProvidedNodesRadio=Utiliser les nœuds Bitcoin Core fournis
|
||||
settings.net.usePublicNodesRadio=Utiliser le réseau Bitcoin public
|
||||
settings.net.useCustomNodesRadio=Utiliser des nœuds Bitcoin Core personnalisés
|
||||
settings.net.warn.usePublicNodes=Si vous utilisez le réseau public Bitcoin, vous serez confronté à de sérieux problèmes de confidentialité. Ceci est dû à la conception et à la mise en œuvre du bloom filter cassé. Il convient aux portefeuilles SPV comme BitcoinJ (utilisé dans Haveno). Tout nœud complet que vous connectez peut découvrir que toutes les adresses de votre portefeuille appartiennent à une seule entité. \n\nPour plus d'informations, veuillez visiter: [HYPERLINK:https://bisq.network/blog/privacy-in-bitsquare] \n\nÊtes-vous sûr de vouloir utiliser un nœud public?
|
||||
settings.net.warn.usePublicNodes=Si vous utilisez des nœuds publics Monero, vous êtes exposé à tout risque lié à l'utilisation de nœuds distants non fiables.\n\nVeuillez lire plus de détails sur [HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html].\n\nÊtes-vous sûr de vouloir utiliser des nœuds publics ?
|
||||
settings.net.warn.usePublicNodes.useProvided=Non, utiliser les nœuds fournis.
|
||||
settings.net.warn.usePublicNodes.usePublic=Oui, utiliser un réseau public
|
||||
settings.net.warn.useCustomNodes.B2XWarning=Veuillez vous assurer que votre nœud Bitcoin est un nœud Bitcoin Core de confiance !\n\nLa connexion à des nœuds qui ne respectent pas les règles du consensus de Bitcoin Core peut corrompre votre portefeuille et causer des problèmes dans le processus de trading.\n\nLes utilisateurs qui se connectent à des nœuds qui ne respectent pas les règles du consensus sont responsables des dommages qui en résultent. Tout litige qui en résulte sera tranché en faveur de l'autre pair. Aucune assistance technique ne sera apportée aux utilisateurs qui ignorent ces mécanismes d'alertes et de protections !
|
||||
settings.net.warn.invalidBtcConfig=La connection au réseau Bitcoin a échoué car votre configuration est invalide.\n\nVotre configuration a été réinitialisée afin d'utiliser les noeuds Bitcoin fournis à la place. Vous allez avoir besoin de relancer l'application.
|
||||
settings.net.localhostBtcNodeInfo=Information additionnelle : Haveno cherche un noeud Bitcoin local au démarrage. Si il est trouvé, Haveno communiquera avec le réseau Bitcoin uniquement à travers ce noeud.
|
||||
settings.net.localhostXmrNodeInfo=Information additionnelle : Haveno cherche un noeud Bitcoin local au démarrage. Si il est trouvé, Haveno communiquera avec le réseau Bitcoin uniquement à travers ce noeud.
|
||||
settings.net.p2PPeersLabel=Pairs connectés
|
||||
settings.net.onionAddressColumn=Adresse onion
|
||||
settings.net.creationDateColumn=Établi
|
||||
@ -1426,7 +1426,7 @@ filterWindow.mediators=Médiateurs filtrés (adresses onion sep. par une virgule
|
||||
filterWindow.refundAgents=Agents de remboursement filtrés (adresses onion sep. par virgule)
|
||||
filterWindow.seedNode=Nœuds de seed filtrés (adresses onion séparées par une virgule)
|
||||
filterWindow.priceRelayNode=Nœuds relais avec prix filtrés (adresses onion séparées par une virgule)
|
||||
filterWindow.btcNode=Nœuds Bitcoin filtrés (adresses séparées par une virgule + port)
|
||||
filterWindow.xmrNode=Nœuds Bitcoin filtrés (adresses séparées par une virgule + port)
|
||||
filterWindow.preventPublicBtcNetwork=Empêcher l'utilisation du réseau public Bitcoin
|
||||
filterWindow.disableAutoConf=Désactiver la confirmation automatique
|
||||
filterWindow.autoConfExplorers=Explorateur d'auto-confirmations filtrés (addresses à virgule de séparation)
|
||||
|
@ -1024,19 +1024,19 @@ settings.preferences.editCustomExplorer.addressUrl=Address URL
|
||||
settings.net.btcHeader=Network Bitcoin
|
||||
settings.net.p2pHeader=Rete Haveno
|
||||
settings.net.onionAddressLabel=Il mio indirizzo onion
|
||||
settings.net.btcNodesLabel=Usa nodi Bitcoin Core personalizzati
|
||||
settings.net.bitcoinPeersLabel=Peer connessi
|
||||
settings.net.useTorForBtcJLabel=Usa Tor per la rete Bitcoin
|
||||
settings.net.bitcoinNodesLabel=Nodi Bitcoin Core a cui connettersi
|
||||
settings.net.xmrNodesLabel=Usa nodi Monero personalizzati
|
||||
settings.net.moneroPeersLabel=Peer connessi
|
||||
settings.net.useTorForXmrJLabel=Usa Tor per la rete Monero
|
||||
settings.net.moneroNodesLabel=Nodi Monero a cui connettersi
|
||||
settings.net.useProvidedNodesRadio=Usa i nodi Bitcoin Core forniti
|
||||
settings.net.usePublicNodesRadio=Usa la rete pubblica di Bitcoin
|
||||
settings.net.useCustomNodesRadio=Usa nodi Bitcoin Core personalizzati
|
||||
settings.net.warn.usePublicNodes=If you use the public Bitcoin network you are exposed to a severe privacy problem caused by the broken bloom filter design and implementation which is used for SPV wallets like BitcoinJ (used in Haveno). Any full node you are connected to could find out that all your wallet addresses belong to one entity.\n\nPlease read more about the details at [HYPERLINK:https://bisq.network/blog/privacy-in-bitsquare].\n\nAre you sure you want to use the public nodes?
|
||||
settings.net.warn.usePublicNodes=If you use public Monero nodes, you are subject to any risk of using untrusted remote nodes.\n\nPlease read more details at [HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html].\n\nAre you sure you want to use public nodes?
|
||||
settings.net.warn.usePublicNodes.useProvided=No, utilizza i nodi forniti
|
||||
settings.net.warn.usePublicNodes.usePublic=Sì, usa la rete pubblica
|
||||
settings.net.warn.useCustomNodes.B2XWarning=Assicurati che il tuo nodo Bitcoin sia un nodo Bitcoin Core di fiducia!\n\nLa connessione a nodi che non seguono le regole di consenso di Bitcoin Core potrebbe corrompere il tuo portafoglio e causare problemi nel processo di scambio.\n\nGli utenti che si connettono a nodi che violano le regole di consenso sono responsabili per qualsiasi danno risultante. Eventuali controversie risultanti saranno decise a favore dell'altro pari. Nessun supporto tecnico verrà fornito agli utenti che ignorano questo meccanismo di avvertimento e protezione!
|
||||
settings.net.warn.invalidBtcConfig=Connessione alla rete Bitcoin non riuscita perché la configurazione non è valida.\n\nLa tua configurazione è stata ripristinata per utilizzare invece i nodi Bitcoin forniti. Dovrai riavviare l'applicazione.
|
||||
settings.net.localhostBtcNodeInfo=Informazioni di base: Haveno cerca un nodo Bitcoin locale all'avvio. Se viene trovato, Haveno comunicherà con la rete Bitcoin esclusivamente attraverso di esso.
|
||||
settings.net.localhostXmrNodeInfo=Informazioni di base: Haveno cerca un nodo Bitcoin locale all'avvio. Se viene trovato, Haveno comunicherà con la rete Bitcoin esclusivamente attraverso di esso.
|
||||
settings.net.p2PPeersLabel=Peer connessi
|
||||
settings.net.onionAddressColumn=Indirizzo onion
|
||||
settings.net.creationDateColumn=Stabilito
|
||||
@ -1425,7 +1425,7 @@ filterWindow.mediators=Mediatori filtrati (indirizzi onion separati con una virg
|
||||
filterWindow.refundAgents=Agenti di rimborso filtrati (virgola sep. indirizzi onion)
|
||||
filterWindow.seedNode=Nodi seme filtrati (separati con una virgola)
|
||||
filterWindow.priceRelayNode=Prezzo filtrato dai nodi relay (virgola sep. indirizzi onion)
|
||||
filterWindow.btcNode=Nodi Bitcoin filtrati (indirizzo + porta separati con una virgola)
|
||||
filterWindow.xmrNode=Nodi Bitcoin filtrati (indirizzo + porta separati con una virgola)
|
||||
filterWindow.preventPublicBtcNetwork=Impedisci l'utilizzo della rete pubblica Bitcoin
|
||||
filterWindow.disableAutoConf=Disable auto-confirm
|
||||
filterWindow.autoConfExplorers=Filtered auto-confirm explorers (comma sep. addresses)
|
||||
|
@ -1024,19 +1024,19 @@ settings.preferences.editCustomExplorer.addressUrl=アドレスURL
|
||||
settings.net.btcHeader=ビットコインのネットワーク
|
||||
settings.net.p2pHeader=Havenoネットワーク
|
||||
settings.net.onionAddressLabel=私のonionアドレス
|
||||
settings.net.btcNodesLabel=任意のビットコインノードを使う
|
||||
settings.net.bitcoinPeersLabel=接続されたピア
|
||||
settings.net.useTorForBtcJLabel=BitcoinネットワークにTorを使用
|
||||
settings.net.bitcoinNodesLabel=接続するBitcoin Coreノード:
|
||||
settings.net.xmrNodesLabel=任意のモネロノードを使う
|
||||
settings.net.moneroPeersLabel=接続されたピア
|
||||
settings.net.useTorForXmrJLabel=MoneroネットワークにTorを使用
|
||||
settings.net.moneroNodesLabel=接続するMoneroノード:
|
||||
settings.net.useProvidedNodesRadio=提供されたBitcoin Core ノードを使う
|
||||
settings.net.usePublicNodesRadio=ビットコインの公共ネットワークを使用
|
||||
settings.net.useCustomNodesRadio=任意のビットコインノードを使う
|
||||
settings.net.warn.usePublicNodes=パブリックなビットコインネットワークを使用する場合、BitcoinJ(Havenoで使用)のようなSPVウォレットに使用される破損したブルームフィルターの設計と実装によって、重大なプライバシー問題にさらされます。接続しているすべてのノードは、すべてのウォレットアドレスが1つのエンティティに属していることがわかります。\n\n詳細については、[HYPERLINK:https://bisq.network/blog/privacy-in-bitsquare] をご覧ください。\n\nパブリックノードを使用しても本当によろしいですか?
|
||||
settings.net.warn.usePublicNodes=パブリックなMoneroノードを使用する場合、信頼できないリモートノードを使用するリスクにさらされる可能性があります。\n\n詳細については、[HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html] をご覧ください。\n\nパブリックノードを使用することを確認してもよろしいですか?
|
||||
settings.net.warn.usePublicNodes.useProvided=いいえ、提供されたノードを使用します
|
||||
settings.net.warn.usePublicNodes.usePublic=はい、公共ネットワークを使います
|
||||
settings.net.warn.useCustomNodes.B2XWarning=あなたのBitcoinノードが信頼できるBitcoin Coreノードであることを確認してください!\n\nBitcoin Coreのコンセンサスルールに従わないノードに接続すると、ウォレットが破損し、トレードプロセスに問題が生じる可能性があります。\n\nコンセンサスルールに違反するノードへ接続したユーザーは、引き起こされるいかなる損害に対しても責任を負います。 結果として生じる係争は、他のピアによって決定されます。この警告と保護のメカニズムを無視しているユーザーには、テクニカルサポートは提供されません!
|
||||
settings.net.warn.invalidBtcConfig=無効な設定によりビットコインネットワークとの接続は失敗しました。\n\n代りに提供されたビットコインノードを利用するのに設定はリセットされました。アプリを再起動する必要があります。
|
||||
settings.net.localhostBtcNodeInfo=バックグラウンド情報:Havenoが起動時に、ローカルビットコインノードを探します。見つかれば、Havenoはそのノードを排他的に介してビットコインネットワークと接続します。
|
||||
settings.net.localhostXmrNodeInfo=バックグラウンド情報:Havenoが起動時に、ローカルビットコインノードを探します。見つかれば、Havenoはそのノードを排他的に介してビットコインネットワークと接続します。
|
||||
settings.net.p2PPeersLabel=接続されたピア
|
||||
settings.net.onionAddressColumn=Onionアドレス
|
||||
settings.net.creationDateColumn=既定
|
||||
@ -1425,7 +1425,7 @@ filterWindow.mediators=フィルター済調停者(コンマ区切り onionア
|
||||
filterWindow.refundAgents=フィルター済仲裁人(コンマ区切り onionアドレス)
|
||||
filterWindow.seedNode=フィルター済シードノード(コンマ区切り onionアドレス)
|
||||
filterWindow.priceRelayNode=フィルター済価格中継ノード(コンマ区切り onionアドレス)
|
||||
filterWindow.btcNode=フィルター済ビットコインノード(コンマ区切り アドレス+ポート)
|
||||
filterWindow.xmrNode=フィルター済ビットコインノード(コンマ区切り アドレス+ポート)
|
||||
filterWindow.preventPublicBtcNetwork=パブリックビットコインネットワークの使用を防止
|
||||
filterWindow.disableAutoConf=自動確認を無効にする
|
||||
filterWindow.autoConfExplorers=フィルター済自動確認エクスプローラ(コンマ区切りアドレス)
|
||||
|
@ -1027,19 +1027,19 @@ settings.preferences.editCustomExplorer.addressUrl=Address URL
|
||||
settings.net.btcHeader=Rede Bitcoin
|
||||
settings.net.p2pHeader=Rede Haveno
|
||||
settings.net.onionAddressLabel=Meu endereço onion
|
||||
settings.net.btcNodesLabel=Usar nodos personalizados do Bitcoin Core
|
||||
settings.net.bitcoinPeersLabel=Pares conectados
|
||||
settings.net.useTorForBtcJLabel=Usar Tor na rede Bitcoin
|
||||
settings.net.bitcoinNodesLabel=Conexão a nodos do Bitcoin Core
|
||||
settings.net.xmrNodesLabel=Usar nodos personalizados do Monero
|
||||
settings.net.moneroPeersLabel=Pares conectados
|
||||
settings.net.useTorForXmrJLabel=Usar Tor na rede Monero
|
||||
settings.net.moneroNodesLabel=Conexão a nodos do Monero
|
||||
settings.net.useProvidedNodesRadio=Usar nodos do Bitcoin Core fornecidos
|
||||
settings.net.usePublicNodesRadio=Usar rede pública do Bitcoin
|
||||
settings.net.useCustomNodesRadio=Usar nodos personalizados do Bitcoin Core
|
||||
settings.net.warn.usePublicNodes=If you use the public Bitcoin network you are exposed to a severe privacy problem caused by the broken bloom filter design and implementation which is used for SPV wallets like BitcoinJ (used in Haveno). Any full node you are connected to could find out that all your wallet addresses belong to one entity.\n\nPlease read more about the details at [HYPERLINK:https://bisq.network/blog/privacy-in-bitsquare].\n\nAre you sure you want to use the public nodes?
|
||||
settings.net.warn.usePublicNodes=If you use public Monero nodes, you are subject to any risk of using untrusted remote nodes.\n\nPlease read more details at [HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html].\n\nAre you sure you want to use public nodes?
|
||||
settings.net.warn.usePublicNodes.useProvided=Não, usar os nodos fornecidos
|
||||
settings.net.warn.usePublicNodes.usePublic=Sim, usar rede pública
|
||||
settings.net.warn.useCustomNodes.B2XWarning=Certifique-se de que o seu nodo Bitcoin é um nodo Bitcoin Core confiável!\n\nAo se conectar a nodos que não estão seguindo as regras de consenso do Bitcoin Core, você pode corromper a sua carteira e causar problemas no processo de negociação.\n\nOs usuários que se conectam a nodos que violam as regras de consenso são responsáveis pelos danos que forem criados por isso. As disputas causadas por esse motivo serão decididas a favor do outro negociante. Nenhum suporte técnico será fornecido para os usuários que ignorarem esse aviso e os mecanismos de proteção!
|
||||
settings.net.warn.invalidBtcConfig=A conexão com a rede Bitcoin falhou porque suas configurações são inválidas.\n\nSuas configurações foram resetadas para utilizar os nós fornecidos da rede Bitcoin. É necessário reiniciar o aplicativo.
|
||||
settings.net.localhostBtcNodeInfo=Informações básicas: Haveno busca por um nó Bitcoin local na inicialização. Caso encontre, Haveno irá comunicar com a rede Bitcoin exclusivamente através deste nó.
|
||||
settings.net.localhostXmrNodeInfo=Informações básicas: Haveno busca por um nó Bitcoin local na inicialização. Caso encontre, Haveno irá comunicar com a rede Bitcoin exclusivamente através deste nó.
|
||||
settings.net.p2PPeersLabel=Pares conectados
|
||||
settings.net.onionAddressColumn=Endereço onion
|
||||
settings.net.creationDateColumn=Estabelecida
|
||||
@ -1430,7 +1430,7 @@ filterWindow.mediators=Mediadores filtrados (endereços onion separados por vír
|
||||
filterWindow.refundAgents=Agentes de reembolso filtrados (endereços onion separados por vírgula)
|
||||
filterWindow.seedNode=Nós de semente filtrados (endereços onion sep. por vírgula)
|
||||
filterWindow.priceRelayNode=Nós de transmissão de preço filtrados (endereços onion sep. por vírgula)
|
||||
filterWindow.btcNode=Nós de Bitcoin filtrados (endereços + portas sep. por vírgula)
|
||||
filterWindow.xmrNode=Nós de Bitcoin filtrados (endereços + portas sep. por vírgula)
|
||||
filterWindow.preventPublicBtcNetwork=Prevenir uso da rede de Bitcoin pública
|
||||
filterWindow.disableAutoConf=Disable auto-confirm
|
||||
filterWindow.autoConfExplorers=Filtered auto-confirm explorers (comma sep. addresses)
|
||||
|
@ -1024,19 +1024,19 @@ settings.preferences.editCustomExplorer.addressUrl=Address URL
|
||||
settings.net.btcHeader=Rede Bitcoin
|
||||
settings.net.p2pHeader=Rede do Haveno
|
||||
settings.net.onionAddressLabel=O meu endereço onion
|
||||
settings.net.btcNodesLabel=Usar nós de Bitcoin Core personalizados
|
||||
settings.net.bitcoinPeersLabel=Pares conectados
|
||||
settings.net.useTorForBtcJLabel=Usar Tor para a rede de Bitcoin
|
||||
settings.net.bitcoinNodesLabel=Nós de Bitcoin Core para conectar
|
||||
settings.net.xmrNodesLabel=Usar nós de Monero personalizados
|
||||
settings.net.moneroPeersLabel=Pares conectados
|
||||
settings.net.useTorForXmrJLabel=Usar Tor para a rede de Monero
|
||||
settings.net.moneroNodesLabel=Nós de Monero para conectar
|
||||
settings.net.useProvidedNodesRadio=Usar nós de Bitcoin Core providenciados
|
||||
settings.net.usePublicNodesRadio=Usar rede de Bitcoin pública
|
||||
settings.net.useCustomNodesRadio=Usar nós de Bitcoin Core personalizados
|
||||
settings.net.warn.usePublicNodes=If you use the public Bitcoin network you are exposed to a severe privacy problem caused by the broken bloom filter design and implementation which is used for SPV wallets like BitcoinJ (used in Haveno). Any full node you are connected to could find out that all your wallet addresses belong to one entity.\n\nPlease read more about the details at [HYPERLINK:https://bisq.network/blog/privacy-in-bitsquare].\n\nAre you sure you want to use the public nodes?
|
||||
settings.net.warn.usePublicNodes=If you use public Monero nodes, you are subject to any risk of using untrusted remote nodes.\n\nPlease read more details at [HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html].\n\nAre you sure you want to use public nodes?
|
||||
settings.net.warn.usePublicNodes.useProvided=Não, usar nós providenciados
|
||||
settings.net.warn.usePublicNodes.usePublic=Sim, usar a rede pública
|
||||
settings.net.warn.useCustomNodes.B2XWarning=Por favor, certifique-se de que seu nó Bitcoin é um nó confiável do Bitcoin Core!\n\nConectar-se a nós que não seguem as regras de consenso do Bitcoin Core pode corromper a sua carteira e causar problemas no processo de negócio.\n\nOs usuários que se conectam a nós que violam regras de consenso são responsáveis por qualquer dano resultante. Quaisquer disputas resultantes serão decididas em favor do outro par. Nenhum suporte técnico será dado aos usuários que ignorarem esses alertas e mecanismos de proteção!
|
||||
settings.net.warn.invalidBtcConfig=A conexão à rede Bitcoin falhou porque sua configuração é inválida.\n\nA sua configuração foi redefinida para usar os nós de Bitcoin fornecidos. Você precisará reiniciar o programa.
|
||||
settings.net.localhostBtcNodeInfo=Background information: Haveno looks for a local Bitcoin node when starting. If it is found, Haveno will communicate with the Bitcoin network exclusively through it.
|
||||
settings.net.localhostXmrNodeInfo=Background information: Haveno looks for a local Bitcoin node when starting. If it is found, Haveno will communicate with the Bitcoin network exclusively through it.
|
||||
settings.net.p2PPeersLabel=Pares conectados
|
||||
settings.net.onionAddressColumn=Endereço onion
|
||||
settings.net.creationDateColumn=Estabelecida
|
||||
@ -1425,7 +1425,7 @@ filterWindow.mediators=Mediadores filtrados (endereços onion separados por vír
|
||||
filterWindow.refundAgents=Agentes de reembolso filtrados (endereços onion sep. por virgula)
|
||||
filterWindow.seedNode=Nós de semente filtrados (endereços onion sep. por vírgula)
|
||||
filterWindow.priceRelayNode=Nós de transmissão de preço filtrados (endereços onion sep. por vírgula)
|
||||
filterWindow.btcNode=Nós de Bitcoin filtrados (endereços + portas sep. por vírgula)
|
||||
filterWindow.xmrNode=Nós de Bitcoin filtrados (endereços + portas sep. por vírgula)
|
||||
filterWindow.preventPublicBtcNetwork=Prevenir uso da rede de Bitcoin pública
|
||||
filterWindow.disableAutoConf=Disable auto-confirm
|
||||
filterWindow.autoConfExplorers=Filtered auto-confirm explorers (comma sep. addresses)
|
||||
|
@ -1024,19 +1024,19 @@ settings.preferences.editCustomExplorer.addressUrl=Address URL
|
||||
settings.net.btcHeader=Сеть Биткойн
|
||||
settings.net.p2pHeader=Haveno network
|
||||
settings.net.onionAddressLabel=Мой onion-адрес
|
||||
settings.net.btcNodesLabel=Использовать особые узлы Bitcoin Core
|
||||
settings.net.bitcoinPeersLabel=Подключенные пиры
|
||||
settings.net.useTorForBtcJLabel=Использовать Tor для сети Биткойн
|
||||
settings.net.bitcoinNodesLabel=Узлы Bitcoin Core для подключения
|
||||
settings.net.xmrNodesLabel=Использовать особые узлы Monero
|
||||
settings.net.moneroPeersLabel=Подключенные пиры
|
||||
settings.net.useTorForXmrJLabel=Использовать Tor для сети Monero
|
||||
settings.net.moneroNodesLabel=Узлы Monero для подключения
|
||||
settings.net.useProvidedNodesRadio=Использовать предоставленные узлы Bitcoin Core
|
||||
settings.net.usePublicNodesRadio=Использовать общедоступную сеть Bitcoin
|
||||
settings.net.useCustomNodesRadio=Использовать особые узлы Bitcoin Core
|
||||
settings.net.warn.usePublicNodes=If you use the public Bitcoin network you are exposed to a severe privacy problem caused by the broken bloom filter design and implementation which is used for SPV wallets like BitcoinJ (used in Haveno). Any full node you are connected to could find out that all your wallet addresses belong to one entity.\n\nPlease read more about the details at [HYPERLINK:https://bisq.network/blog/privacy-in-bitsquare].\n\nAre you sure you want to use the public nodes?
|
||||
settings.net.warn.usePublicNodes=If you use public Monero nodes, you are subject to any risk of using untrusted remote nodes.\n\nPlease read more details at [HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html].\n\nAre you sure you want to use public nodes?
|
||||
settings.net.warn.usePublicNodes.useProvided=Нет, использовать предоставленные узлы
|
||||
settings.net.warn.usePublicNodes.usePublic=Да, использовать общедоступную сеть
|
||||
settings.net.warn.useCustomNodes.B2XWarning=Убедитесь, что ваш узел Биткойн является доверенным узлом Bitcoin Core! \n\nПодключение к узлам, не следующим правилам консенсуса Bitcoin Core, может повредить ваш кошелек и вызвать проблемы в процессе торговли.\n\nПользователи, подключающиеся к узлам, нарушающим правила консенсуса, несут ответственность за любой причиненный ущерб. Любые споры в таком случае будут решаться в пользу вашего контрагента. Пользователям, игнорирующим это предупреждение и механизмы защиты, техническая поддержка предоставляться не будет!
|
||||
settings.net.warn.invalidBtcConfig=Connection to the Bitcoin network failed because your configuration is invalid.\n\nYour configuration has been reset to use the provided Bitcoin nodes instead. You will need to restart the application.
|
||||
settings.net.localhostBtcNodeInfo=Background information: Haveno looks for a local Bitcoin node when starting. If it is found, Haveno will communicate with the Bitcoin network exclusively through it.
|
||||
settings.net.localhostXmrNodeInfo=Background information: Haveno looks for a local Bitcoin node when starting. If it is found, Haveno will communicate with the Bitcoin network exclusively through it.
|
||||
settings.net.p2PPeersLabel=Подключенные пиры
|
||||
settings.net.onionAddressColumn=Onion-адрес
|
||||
settings.net.creationDateColumn=Создано
|
||||
@ -1425,7 +1425,7 @@ filterWindow.mediators=Filtered mediators (comma sep. onion addresses)
|
||||
filterWindow.refundAgents=Filtered refund agents (comma sep. onion addresses)
|
||||
filterWindow.seedNode=Отфильтрованные исходные узлы (onion-адреса через запят.)
|
||||
filterWindow.priceRelayNode=Отфильтрованные ретрансляторы курса (onion-адреса через запят.)
|
||||
filterWindow.btcNode=Отфильтрованные узлы Биткойн (адреса + порты через запят.)
|
||||
filterWindow.xmrNode=Отфильтрованные узлы Биткойн (адреса + порты через запят.)
|
||||
filterWindow.preventPublicBtcNetwork=Не использовать общедоступную сеть Биткойн
|
||||
filterWindow.disableAutoConf=Disable auto-confirm
|
||||
filterWindow.autoConfExplorers=Filtered auto-confirm explorers (comma sep. addresses)
|
||||
|
@ -1024,19 +1024,19 @@ settings.preferences.editCustomExplorer.addressUrl=Address URL
|
||||
settings.net.btcHeader=เครือข่าย Bitcoin
|
||||
settings.net.p2pHeader=Haveno network
|
||||
settings.net.onionAddressLabel=ที่อยู่ onion ของฉัน
|
||||
settings.net.btcNodesLabel=ใช้โหนดเครือข่าย Bitcoin Core ที่กำหนดเอง
|
||||
settings.net.bitcoinPeersLabel=เชื่อมต่อกับเน็ตเวิร์ก peers แล้ว
|
||||
settings.net.useTorForBtcJLabel=ใช้ Tor สำหรับเครือข่าย Bitcoin
|
||||
settings.net.bitcoinNodesLabel=ใช้โหนดเครือข่าย Bitcoin Core เพื่อเชื่อมต่อ
|
||||
settings.net.xmrNodesLabel=ใช้โหนดเครือข่าย Monero ที่กำหนดเอง
|
||||
settings.net.moneroPeersLabel=เชื่อมต่อกับเน็ตเวิร์ก peers แล้ว
|
||||
settings.net.useTorForXmrJLabel=ใช้ Tor สำหรับเครือข่าย Monero
|
||||
settings.net.moneroNodesLabel=ใช้โหนดเครือข่าย Monero เพื่อเชื่อมต่อ
|
||||
settings.net.useProvidedNodesRadio=ใช้โหนดเครือข่าย Bitcoin ที่ให้มา
|
||||
settings.net.usePublicNodesRadio=ใช้เครือข่าย Bitcoin สาธารณะ
|
||||
settings.net.useCustomNodesRadio=ใช้โหนดเครือข่าย Bitcoin Core ที่กำหนดเอง
|
||||
settings.net.warn.usePublicNodes=If you use the public Bitcoin network you are exposed to a severe privacy problem caused by the broken bloom filter design and implementation which is used for SPV wallets like BitcoinJ (used in Haveno). Any full node you are connected to could find out that all your wallet addresses belong to one entity.\n\nPlease read more about the details at [HYPERLINK:https://bisq.network/blog/privacy-in-bitsquare].\n\nAre you sure you want to use the public nodes?
|
||||
settings.net.warn.usePublicNodes=If you use public Monero nodes, you are subject to any risk of using untrusted remote nodes.\n\nPlease read more details at [HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html].\n\nAre you sure you want to use public nodes?
|
||||
settings.net.warn.usePublicNodes.useProvided=ไม่ ใช้โหนดที่ให้มา
|
||||
settings.net.warn.usePublicNodes.usePublic=ใช่ ใช้เครือข่ายสาธารณะ
|
||||
settings.net.warn.useCustomNodes.B2XWarning=โปรดตรวจสอบว่าโหนด Bitcoin ของคุณเป็นโหนด Bitcoin Core ที่เชื่อถือได้!\n\nการเชื่อมต่อกับโหนดที่ไม่ปฏิบัติตามกฎกติกาการยินยอมของ Bitcoin Core อาจทำให้ wallet ของคุณเกิดปัญหาในกระบวนการทางการซื้อขายได้\n\nผู้ใช้ที่เชื่อมต่อกับโหนดที่ละเมิดกฎเป็นเอกฉันท์นั้นจำเป็นต้องรับผิดชอบต่อความเสียหายที่สร้างขึ้น ข้อพิพาทที่เกิดจากการที่จะได้รับการตัดสินใจจาก เน็ตกเวิร์ก Peer คนอื่น ๆ จะไม่มีการสนับสนุนด้านเทคนิคแก่ผู้ใช้ที่ไม่สนใจคำเตือนและกลไกการป้องกันของเรา!
|
||||
settings.net.warn.invalidBtcConfig=Connection to the Bitcoin network failed because your configuration is invalid.\n\nYour configuration has been reset to use the provided Bitcoin nodes instead. You will need to restart the application.
|
||||
settings.net.localhostBtcNodeInfo=Background information: Haveno looks for a local Bitcoin node when starting. If it is found, Haveno will communicate with the Bitcoin network exclusively through it.
|
||||
settings.net.localhostXmrNodeInfo=Background information: Haveno looks for a local Bitcoin node when starting. If it is found, Haveno will communicate with the Bitcoin network exclusively through it.
|
||||
settings.net.p2PPeersLabel=เชื่อมต่อกับเน็ตเวิร์ก peers แล้ว
|
||||
settings.net.onionAddressColumn=ที่อยู่ Onion
|
||||
settings.net.creationDateColumn=ที่จัดตั้งขึ้น
|
||||
@ -1425,7 +1425,7 @@ filterWindow.mediators=Filtered mediators (comma sep. onion addresses)
|
||||
filterWindow.refundAgents=Filtered refund agents (comma sep. onion addresses)
|
||||
filterWindow.seedNode=แหล่งข้อมูลในโหนดเครือข่ายที่ได้รับการกรอง (คั่นด้วยเครื่องหมายจุลภาค ที่อยู่ onion)
|
||||
filterWindow.priceRelayNode=โหนดผลัดเปลี่ยนราคาที่ได้รับการกรอง (คั่นด้วยเครื่องหมายจุลภาค ที่อยู่ onion)
|
||||
filterWindow.btcNode=โหนด Bitcoin ที่ได้รับการกรองแล้ว (คั่นด้วยเครื่องหมายจุลภาค ที่อยู่ + พอร์ต)
|
||||
filterWindow.xmrNode=โหนด Bitcoin ที่ได้รับการกรองแล้ว (คั่นด้วยเครื่องหมายจุลภาค ที่อยู่ + พอร์ต)
|
||||
filterWindow.preventPublicBtcNetwork=ป้องกันการใช้เครือข่าย Bitcoin สาธารณะ
|
||||
filterWindow.disableAutoConf=Disable auto-confirm
|
||||
filterWindow.autoConfExplorers=Filtered auto-confirm explorers (comma sep. addresses)
|
||||
|
@ -1026,19 +1026,19 @@ settings.preferences.editCustomExplorer.addressUrl=Address URL
|
||||
settings.net.btcHeader=Mạng Bitcoin
|
||||
settings.net.p2pHeader=Haveno network
|
||||
settings.net.onionAddressLabel=Địa chỉ onion của tôi
|
||||
settings.net.btcNodesLabel=Sử dụng nút Bitcoin Core thông dụng
|
||||
settings.net.bitcoinPeersLabel=Các đối tác được kết nối
|
||||
settings.net.useTorForBtcJLabel=Sử dụng Tor cho mạng Bitcoin
|
||||
settings.net.bitcoinNodesLabel=nút Bitcoin Core để kết nối
|
||||
settings.net.xmrNodesLabel=Sử dụng nút Monero thông dụng
|
||||
settings.net.moneroPeersLabel=Các đối tác được kết nối
|
||||
settings.net.useTorForXmrJLabel=Sử dụng Tor cho mạng Monero
|
||||
settings.net.moneroNodesLabel=nút Monero để kết nối
|
||||
settings.net.useProvidedNodesRadio=Sử dụng các nút Bitcoin Core đã cung cấp
|
||||
settings.net.usePublicNodesRadio=Sử dụng mạng Bitcoin công cộng
|
||||
settings.net.useCustomNodesRadio=Sử dụng nút Bitcoin Core thông dụng
|
||||
settings.net.warn.usePublicNodes=If you use the public Bitcoin network you are exposed to a severe privacy problem caused by the broken bloom filter design and implementation which is used for SPV wallets like BitcoinJ (used in Haveno). Any full node you are connected to could find out that all your wallet addresses belong to one entity.\n\nPlease read more about the details at [HYPERLINK:https://bisq.network/blog/privacy-in-bitsquare].\n\nAre you sure you want to use the public nodes?
|
||||
settings.net.warn.usePublicNodes=If you use public Monero nodes, you are subject to any risk of using untrusted remote nodes.\n\nPlease read more details at [HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html].\n\nAre you sure you want to use public nodes?
|
||||
settings.net.warn.usePublicNodes.useProvided=Không, sử dụng nút được cung cấp
|
||||
settings.net.warn.usePublicNodes.usePublic=Vâng, sử dụng nút công cộng
|
||||
settings.net.warn.useCustomNodes.B2XWarning=Vui lòng chắc chắn rằng nút Bitcoin của bạn là nút Bitcoin Core đáng tin cậy!\n\nKết nối với nút không tuân thủ nguyên tắc đồng thuận Bitcoin Core có thể làm hỏng ví của bạn và gây ra các vấn đề trong quá trình giao dịch.\n\nNgười dùng kết nối với nút vi phạm nguyên tắc đồng thuận chịu trách nhiệm đối với các thiệt hại mà việc này gây ra. Các khiếu nại do điều này gây ra sẽ được quyết định theo hướng có lợi cho đối tác bên kia. Sẽ không có hỗ trợ về mặt kỹ thuật nào cho người dùng không tuân thủ cơ chế cảnh báo và bảo vệ của chúng tôi!
|
||||
settings.net.warn.invalidBtcConfig=Connection to the Bitcoin network failed because your configuration is invalid.\n\nYour configuration has been reset to use the provided Bitcoin nodes instead. You will need to restart the application.
|
||||
settings.net.localhostBtcNodeInfo=Background information: Haveno looks for a local Bitcoin node when starting. If it is found, Haveno will communicate with the Bitcoin network exclusively through it.
|
||||
settings.net.localhostXmrNodeInfo=Background information: Haveno looks for a local Bitcoin node when starting. If it is found, Haveno will communicate with the Bitcoin network exclusively through it.
|
||||
settings.net.p2PPeersLabel=Các đối tác được kết nối
|
||||
settings.net.onionAddressColumn=Địa chỉ onion
|
||||
settings.net.creationDateColumn=Đã thiết lập
|
||||
@ -1427,7 +1427,7 @@ filterWindow.mediators=Filtered mediators (comma sep. onion addresses)
|
||||
filterWindow.refundAgents=Filtered refund agents (comma sep. onion addresses)
|
||||
filterWindow.seedNode=Node cung cấp thông tin đã lọc (địa chỉ onion cách nhau bằng dấu phẩy)
|
||||
filterWindow.priceRelayNode=nút rơle giá đã lọc (địa chỉ onion cách nhau bằng dấu phẩy)
|
||||
filterWindow.btcNode=nút Bitcoin đã lọc (địa chỉ cách nhau bằng dấu phẩy + cửa)
|
||||
filterWindow.xmrNode=nút Bitcoin đã lọc (địa chỉ cách nhau bằng dấu phẩy + cửa)
|
||||
filterWindow.preventPublicBtcNetwork=Ngăn sử dụng mạng Bitcoin công cộng
|
||||
filterWindow.disableAutoConf=Disable auto-confirm
|
||||
filterWindow.autoConfExplorers=Filtered auto-confirm explorers (comma sep. addresses)
|
||||
|
@ -1024,19 +1024,19 @@ settings.preferences.editCustomExplorer.addressUrl=地址 URL
|
||||
settings.net.btcHeader=比特币网络
|
||||
settings.net.p2pHeader=Haveno 网络
|
||||
settings.net.onionAddressLabel=我的匿名地址
|
||||
settings.net.btcNodesLabel=使用自定义比特币主节点
|
||||
settings.net.bitcoinPeersLabel=已连接节点
|
||||
settings.net.useTorForBtcJLabel=使用 Tor 连接比特币网络
|
||||
settings.net.bitcoinNodesLabel=需要连接比特币核心
|
||||
settings.net.xmrNodesLabel=使用自定义比特币主节点
|
||||
settings.net.moneroPeersLabel=已连接节点
|
||||
settings.net.useTorForXmrJLabel=使用 Tor 连接 Monero 网络
|
||||
settings.net.moneroNodesLabel=需要连接 Monero
|
||||
settings.net.useProvidedNodesRadio=使用公共比特币核心节点
|
||||
settings.net.usePublicNodesRadio=使用公共比特币网络
|
||||
settings.net.useCustomNodesRadio=使用自定义比特币主节点
|
||||
settings.net.warn.usePublicNodes=如果你使用公共比特币网络,你就会面临严重的隐私问题,这是由损坏的 bloom filter 设计和实现造成的,它适用于像 BitcoinJ 这样的 SPV 钱包(在 Haveno 中使用)。您所连接的任何完整节点都可以发现您的所有钱包地址都属于一个实体。\n\n详情请浏览: https://bisq.network/blog/privacy-in-bitsquare 。\n\n您确定要使用公共节点吗?
|
||||
settings.net.warn.usePublicNodes=如果您使用公共的Monero节点,您将面临使用不受信任的远程节点带来的任何风险。\n\n请在[HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html]上阅读更多详细信息。\n\n您确定要使用公共节点吗?
|
||||
settings.net.warn.usePublicNodes.useProvided=不,使用给定的节点
|
||||
settings.net.warn.usePublicNodes.usePublic=使用公共网络
|
||||
settings.net.warn.useCustomNodes.B2XWarning=请确保您的比特币节点是一个可信的比特币核心节点!\n\n连接到不遵循比特币核心共识规则的节点可能会损坏您的钱包,并在交易过程中造成问题。\n\n连接到违反共识规则的节点的用户应对任何由此造成的损害负责。任何由此产生的纠纷都将有利于另一方。对于忽略此警告和保护机制的用户,不提供任何技术支持!
|
||||
settings.net.warn.invalidBtcConfig=由于您的配置无效,无法连接至比特币网络。\n\n您的配置已经被重置为默认比特币节点。你需要重启 Haveno。
|
||||
settings.net.localhostBtcNodeInfo=背景信息:Haveno 在启动时会在本地查找比特币节点。如果有,Haveno 将只通过它与比特币网络进行通信。
|
||||
settings.net.localhostXmrNodeInfo=背景信息:Haveno 在启动时会在本地查找比特币节点。如果有,Haveno 将只通过它与比特币网络进行通信。
|
||||
settings.net.p2PPeersLabel=已连接节点
|
||||
settings.net.onionAddressColumn=匿名地址
|
||||
settings.net.creationDateColumn=已建立连接
|
||||
@ -1426,7 +1426,7 @@ filterWindow.mediators=筛选后的调解员(用逗号“,”隔开的洋葱
|
||||
filterWindow.refundAgents=筛选后的退款助理(用逗号“,”隔开的洋葱地址)
|
||||
filterWindow.seedNode=筛选后的种子节点(用逗号“,”隔开的洋葱地址)
|
||||
filterWindow.priceRelayNode=筛选后的价格中继节点(用逗号“,”隔开的洋葱地址)
|
||||
filterWindow.btcNode=筛选后的比特币节点(用逗号“,”隔开的地址+端口)
|
||||
filterWindow.xmrNode=筛选后的比特币节点(用逗号“,”隔开的地址+端口)
|
||||
filterWindow.preventPublicBtcNetwork=禁止使用公共比特币网络
|
||||
filterWindow.disableAutoConf=禁用自动确认
|
||||
filterWindow.autoConfExplorers=已过滤自动确认浏览器(逗号分隔地址)
|
||||
|
@ -1024,19 +1024,19 @@ settings.preferences.editCustomExplorer.addressUrl=地址 URL
|
||||
settings.net.btcHeader=比特幣網絡
|
||||
settings.net.p2pHeader=Haveno 網絡
|
||||
settings.net.onionAddressLabel=我的匿名地址
|
||||
settings.net.btcNodesLabel=使用自定義比特幣主節點
|
||||
settings.net.bitcoinPeersLabel=已連接節點
|
||||
settings.net.useTorForBtcJLabel=使用 Tor 連接比特幣網絡
|
||||
settings.net.bitcoinNodesLabel=需要連接比特幣核心
|
||||
settings.net.xmrNodesLabel=使用自定义Monero节点
|
||||
settings.net.moneroPeersLabel=已連接節點
|
||||
settings.net.useTorForXmrJLabel=使用 Tor 連接 Monero 網絡
|
||||
settings.net.moneroNodesLabel=需要連接 Monero
|
||||
settings.net.useProvidedNodesRadio=使用公共比特幣核心節點
|
||||
settings.net.usePublicNodesRadio=使用公共比特幣網絡
|
||||
settings.net.useCustomNodesRadio=使用自定義比特幣主節點
|
||||
settings.net.warn.usePublicNodes=如果你使用公共比特幣網絡,你就會面臨嚴重的隱私問題,這是由損壞的 bloom filter 設計和實現造成的,它適用於像 BitcoinJ 這樣的 SPV 錢包(在 Haveno 中使用)。您所連接的任何完整節點都可以發現您的所有錢包地址都屬於一個實體。\n\n詳情請瀏覽: https://bisq.network/blog/privacy-in-bitsquare 。\n\n您確定要使用公共節點嗎?
|
||||
settings.net.warn.usePublicNodes=如果您使用公共的Monero节点,您将面临使用不受信任的远程节点带来的任何风险。\n\n请在[HYPERLINK:https://www.getmonero.org/resources/moneropedia/remote-node.html]阅读更多详细信息。\n\n您确定要使用公共节点吗?
|
||||
settings.net.warn.usePublicNodes.useProvided=不,使用給定的節點
|
||||
settings.net.warn.usePublicNodes.usePublic=使用公共網絡
|
||||
settings.net.warn.useCustomNodes.B2XWarning=請確保您的比特幣節點是一個可信的比特幣核心節點!\n\n連接到不遵循比特幣核心共識規則的節點可能會損壞您的錢包,並在交易過程中造成問題。\n\n連接到違反共識規則的節點的用户應對任何由此造成的損害負責。任何由此產生的糾紛都將有利於另一方。對於忽略此警吿和保護機制的用户,不提供任何技術支持!
|
||||
settings.net.warn.invalidBtcConfig=由於您的配置無效,無法連接至比特幣網絡。\n\n您的配置已經被重置為默認比特幣節點。你需要重啟 Haveno。
|
||||
settings.net.localhostBtcNodeInfo=背景信息:Haveno 在啟動時會在本地查找比特幣節點。如果有,Haveno 將只通過它與比特幣網絡進行通信。
|
||||
settings.net.localhostXmrNodeInfo=背景信息:Haveno 在啟動時會在本地查找比特幣節點。如果有,Haveno 將只通過它與比特幣網絡進行通信。
|
||||
settings.net.p2PPeersLabel=已連接節點
|
||||
settings.net.onionAddressColumn=匿名地址
|
||||
settings.net.creationDateColumn=已建立連接
|
||||
@ -1426,7 +1426,7 @@ filterWindow.mediators=篩選後的調解員(用逗號“,”隔開的洋葱
|
||||
filterWindow.refundAgents=篩選後的退款助理(用逗號“,”隔開的洋葱地址)
|
||||
filterWindow.seedNode=篩選後的種子節點(用逗號“,”隔開的洋葱地址)
|
||||
filterWindow.priceRelayNode=篩選後的價格中繼節點(用逗號“,”隔開的洋葱地址)
|
||||
filterWindow.btcNode=篩選後的比特幣節點(用逗號“,”隔開的地址+端口)
|
||||
filterWindow.xmrNode=篩選後的比特幣節點(用逗號“,”隔開的地址+端口)
|
||||
filterWindow.preventPublicBtcNetwork=禁止使用公共比特幣網絡
|
||||
filterWindow.disableAutoConf=禁用自動確認
|
||||
filterWindow.autoConfExplorers=已過濾自動確認瀏覽器(逗號分隔地址)
|
||||
|
@ -44,7 +44,7 @@ public class BtcNetworkConfigTest {
|
||||
|
||||
@Test
|
||||
public void testProposePeersWhenProxyPresentAndNoPeers() {
|
||||
BtcNetworkConfig config = new BtcNetworkConfig(delegate, mock(NetworkParameters.class), MODE,
|
||||
XmrNetworkConfig config = new XmrNetworkConfig(delegate, mock(NetworkParameters.class), MODE,
|
||||
mock(Socks5Proxy.class));
|
||||
config.proposePeers(Collections.emptyList());
|
||||
|
||||
@ -54,7 +54,7 @@ public class BtcNetworkConfigTest {
|
||||
|
||||
@Test
|
||||
public void testProposePeersWhenProxyNotPresentAndNoPeers() {
|
||||
BtcNetworkConfig config = new BtcNetworkConfig(delegate, mock(NetworkParameters.class), MODE,
|
||||
XmrNetworkConfig config = new XmrNetworkConfig(delegate, mock(NetworkParameters.class), MODE,
|
||||
null);
|
||||
config.proposePeers(Collections.emptyList());
|
||||
|
||||
@ -64,7 +64,7 @@ public class BtcNetworkConfigTest {
|
||||
|
||||
@Test
|
||||
public void testProposePeersWhenPeersPresent() {
|
||||
BtcNetworkConfig config = new BtcNetworkConfig(delegate, mock(NetworkParameters.class), MODE,
|
||||
XmrNetworkConfig config = new XmrNetworkConfig(delegate, mock(NetworkParameters.class), MODE,
|
||||
null);
|
||||
config.proposePeers(Collections.singletonList(mock(PeerAddress.class)));
|
||||
|
||||
|
@ -18,8 +18,8 @@
|
||||
package haveno.core.xmr.nodes;
|
||||
|
||||
import com.runjva.sourceforge.jsocks.protocol.Socks5Proxy;
|
||||
import haveno.core.xmr.nodes.BtcNodeConverter.Facade;
|
||||
import haveno.core.xmr.nodes.BtcNodes.BtcNode;
|
||||
import haveno.core.xmr.nodes.XmrNodeConverter.Facade;
|
||||
import haveno.core.xmr.nodes.XmrNodes.XmrNode;
|
||||
import haveno.network.DnsLookupException;
|
||||
import org.bitcoinj.core.PeerAddress;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@ -32,10 +32,10 @@ import static org.mockito.ArgumentMatchers.anyString;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class BtcNodeConverterTest {
|
||||
public class XmrNodeConverterTest {
|
||||
@Test
|
||||
public void testConvertOnionHost() {
|
||||
BtcNode node = mock(BtcNode.class);
|
||||
XmrNode node = mock(XmrNode.class);
|
||||
when(node.getOnionAddress()).thenReturn("aaa.onion");
|
||||
|
||||
//InetAddress inetAddress = mock(InetAddress.class);
|
||||
@ -43,7 +43,7 @@ public class BtcNodeConverterTest {
|
||||
Facade facade = mock(Facade.class);
|
||||
//when(facade.onionHostToInetAddress(any())).thenReturn(inetAddress);
|
||||
|
||||
PeerAddress peerAddress = new BtcNodeConverter(facade).convertOnionHost(node);
|
||||
PeerAddress peerAddress = new XmrNodeConverter(facade).convertOnionHost(node);
|
||||
// noinspection ConstantConditions
|
||||
assertEquals(node.getOnionAddress(), peerAddress.getHostname());
|
||||
}
|
||||
@ -52,10 +52,10 @@ public class BtcNodeConverterTest {
|
||||
public void testConvertClearNode() {
|
||||
final String ip = "192.168.0.1";
|
||||
|
||||
BtcNode node = mock(BtcNode.class);
|
||||
XmrNode node = mock(XmrNode.class);
|
||||
when(node.getHostNameOrAddress()).thenReturn(ip);
|
||||
|
||||
PeerAddress peerAddress = new BtcNodeConverter().convertClearNode(node);
|
||||
PeerAddress peerAddress = new XmrNodeConverter().convertClearNode(node);
|
||||
// noinspection ConstantConditions
|
||||
InetAddress inetAddress = peerAddress.getAddr();
|
||||
assertEquals(ip, inetAddress.getHostAddress());
|
||||
@ -68,10 +68,10 @@ public class BtcNodeConverterTest {
|
||||
Facade facade = mock(Facade.class);
|
||||
when(facade.torLookup(any(), anyString())).thenReturn(expected);
|
||||
|
||||
BtcNode node = mock(BtcNode.class);
|
||||
XmrNode node = mock(XmrNode.class);
|
||||
when(node.getHostNameOrAddress()).thenReturn("aaa.onion");
|
||||
|
||||
PeerAddress peerAddress = new BtcNodeConverter(facade).convertWithTor(node, mock(Socks5Proxy.class));
|
||||
PeerAddress peerAddress = new XmrNodeConverter(facade).convertWithTor(node, mock(Socks5Proxy.class));
|
||||
|
||||
// noinspection ConstantConditions
|
||||
assertEquals(expected, peerAddress.getAddr());
|
@ -19,7 +19,7 @@ package haveno.core.xmr.nodes;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.runjva.sourceforge.jsocks.protocol.Socks5Proxy;
|
||||
import haveno.core.xmr.nodes.BtcNodes.BtcNode;
|
||||
import haveno.core.xmr.nodes.XmrNodes.XmrNode;
|
||||
import org.bitcoinj.core.PeerAddress;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@ -35,14 +35,14 @@ import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class BtcNodesRepositoryTest {
|
||||
public class XmrNodesRepositoryTest {
|
||||
@Test
|
||||
public void testGetPeerAddressesWhenClearNodes() {
|
||||
BtcNode node = mock(BtcNode.class);
|
||||
XmrNode node = mock(XmrNode.class);
|
||||
when(node.hasClearNetAddress()).thenReturn(true);
|
||||
|
||||
BtcNodeConverter converter = mock(BtcNodeConverter.class, RETURNS_DEEP_STUBS);
|
||||
BtcNodesRepository repository = new BtcNodesRepository(converter,
|
||||
XmrNodeConverter converter = mock(XmrNodeConverter.class, RETURNS_DEEP_STUBS);
|
||||
XmrNodesRepository repository = new XmrNodesRepository(converter,
|
||||
Collections.singletonList(node));
|
||||
|
||||
List<PeerAddress> peers = repository.getPeerAddresses(null, false);
|
||||
@ -52,13 +52,13 @@ public class BtcNodesRepositoryTest {
|
||||
|
||||
@Test
|
||||
public void testGetPeerAddressesWhenConverterReturnsNull() {
|
||||
BtcNodeConverter converter = mock(BtcNodeConverter.class);
|
||||
XmrNodeConverter converter = mock(XmrNodeConverter.class);
|
||||
when(converter.convertClearNode(any())).thenReturn(null);
|
||||
|
||||
BtcNode node = mock(BtcNode.class);
|
||||
XmrNode node = mock(XmrNode.class);
|
||||
when(node.hasClearNetAddress()).thenReturn(true);
|
||||
|
||||
BtcNodesRepository repository = new BtcNodesRepository(converter,
|
||||
XmrNodesRepository repository = new XmrNodesRepository(converter,
|
||||
Collections.singletonList(node));
|
||||
|
||||
List<PeerAddress> peers = repository.getPeerAddresses(null, false);
|
||||
@ -69,14 +69,14 @@ public class BtcNodesRepositoryTest {
|
||||
|
||||
@Test
|
||||
public void testGetPeerAddressesWhenProxyAndClearNodes() {
|
||||
BtcNode node = mock(BtcNode.class);
|
||||
XmrNode node = mock(XmrNode.class);
|
||||
when(node.hasClearNetAddress()).thenReturn(true);
|
||||
|
||||
BtcNode onionNode = mock(BtcNode.class);
|
||||
XmrNode onionNode = mock(XmrNode.class);
|
||||
when(node.hasOnionAddress()).thenReturn(true);
|
||||
|
||||
BtcNodeConverter converter = mock(BtcNodeConverter.class, RETURNS_DEEP_STUBS);
|
||||
BtcNodesRepository repository = new BtcNodesRepository(converter,
|
||||
XmrNodeConverter converter = mock(XmrNodeConverter.class, RETURNS_DEEP_STUBS);
|
||||
XmrNodesRepository repository = new XmrNodesRepository(converter,
|
||||
Lists.newArrayList(node, onionNode));
|
||||
|
||||
List<PeerAddress> peers = repository.getPeerAddresses(mock(Socks5Proxy.class), true);
|
||||
@ -86,14 +86,14 @@ public class BtcNodesRepositoryTest {
|
||||
|
||||
@Test
|
||||
public void testGetPeerAddressesWhenOnionNodesOnly() {
|
||||
BtcNode node = mock(BtcNode.class);
|
||||
XmrNode node = mock(XmrNode.class);
|
||||
when(node.hasClearNetAddress()).thenReturn(true);
|
||||
|
||||
BtcNode onionNode = mock(BtcNode.class);
|
||||
XmrNode onionNode = mock(XmrNode.class);
|
||||
when(node.hasOnionAddress()).thenReturn(true);
|
||||
|
||||
BtcNodeConverter converter = mock(BtcNodeConverter.class, RETURNS_DEEP_STUBS);
|
||||
BtcNodesRepository repository = new BtcNodesRepository(converter,
|
||||
XmrNodeConverter converter = mock(XmrNodeConverter.class, RETURNS_DEEP_STUBS);
|
||||
XmrNodesRepository repository = new XmrNodesRepository(converter,
|
||||
Lists.newArrayList(node, onionNode));
|
||||
|
||||
List<PeerAddress> peers = repository.getPeerAddresses(mock(Socks5Proxy.class), false);
|
@ -18,26 +18,26 @@
|
||||
package haveno.core.xmr.nodes;
|
||||
|
||||
import haveno.core.user.Preferences;
|
||||
import haveno.core.xmr.nodes.BtcNodes.BtcNode;
|
||||
import haveno.core.xmr.nodes.XmrNodes.XmrNode;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static haveno.core.xmr.nodes.BtcNodes.BitcoinNodesOption.CUSTOM;
|
||||
import static haveno.core.xmr.nodes.BtcNodes.BitcoinNodesOption.PUBLIC;
|
||||
import static haveno.core.xmr.nodes.XmrNodes.MoneroNodesOption.CUSTOM;
|
||||
import static haveno.core.xmr.nodes.XmrNodes.MoneroNodesOption.PUBLIC;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class BtcNodesSetupPreferencesTest {
|
||||
public class XmrNodesSetupPreferencesTest {
|
||||
@Test
|
||||
public void testSelectPreferredNodesWhenPublicOption() {
|
||||
Preferences delegate = mock(Preferences.class);
|
||||
when(delegate.getBitcoinNodesOptionOrdinal()).thenReturn(PUBLIC.ordinal());
|
||||
when(delegate.getMoneroNodesOptionOrdinal()).thenReturn(PUBLIC.ordinal());
|
||||
|
||||
BtcNodesSetupPreferences preferences = new BtcNodesSetupPreferences(delegate);
|
||||
List<BtcNode> nodes = preferences.selectPreferredNodes(mock(BtcNodes.class));
|
||||
XmrNodesSetupPreferences preferences = new XmrNodesSetupPreferences(delegate);
|
||||
List<XmrNode> nodes = preferences.selectPreferredNodes(mock(XmrNodes.class));
|
||||
|
||||
assertTrue(nodes.isEmpty());
|
||||
}
|
||||
@ -45,11 +45,11 @@ public class BtcNodesSetupPreferencesTest {
|
||||
@Test
|
||||
public void testSelectPreferredNodesWhenCustomOption() {
|
||||
Preferences delegate = mock(Preferences.class);
|
||||
when(delegate.getBitcoinNodesOptionOrdinal()).thenReturn(CUSTOM.ordinal());
|
||||
when(delegate.getBitcoinNodes()).thenReturn("aaa.onion,bbb.onion");
|
||||
when(delegate.getMoneroNodesOptionOrdinal()).thenReturn(CUSTOM.ordinal());
|
||||
when(delegate.getMoneroNodes()).thenReturn("aaa.onion,bbb.onion");
|
||||
|
||||
BtcNodesSetupPreferences preferences = new BtcNodesSetupPreferences(delegate);
|
||||
List<BtcNode> nodes = preferences.selectPreferredNodes(mock(BtcNodes.class));
|
||||
XmrNodesSetupPreferences preferences = new XmrNodesSetupPreferences(delegate);
|
||||
List<XmrNode> nodes = preferences.selectPreferredNodes(mock(XmrNodes.class));
|
||||
|
||||
assertEquals(2, nodes.size());
|
||||
}
|
@ -554,7 +554,7 @@ public class MainViewModel implements ViewModel, HavenoSetup.HavenoSetupListener
|
||||
}
|
||||
|
||||
private void showPopupIfInvalidBtcConfig() {
|
||||
preferences.setBitcoinNodesOptionOrdinal(0);
|
||||
preferences.setMoneroNodesOptionOrdinal(0);
|
||||
new Popup().warning(Res.get("settings.net.warn.invalidBtcConfig"))
|
||||
.hideCloseButton()
|
||||
.useShutDownButton()
|
||||
|
@ -95,7 +95,7 @@ class DepositListItem {
|
||||
}
|
||||
|
||||
private void updateUsage(int subaddressIndex, List<MoneroTxWallet> cachedTxs) {
|
||||
numTxsWithOutputs = XmrWalletService.getTxsWithIncomingOutputs(cachedTxs, addressEntry.getSubaddressIndex()).size();
|
||||
numTxsWithOutputs = XmrWalletService.getTxsWithIncomingOutputs(addressEntry.getSubaddressIndex(), cachedTxs).size();
|
||||
usage = subaddressIndex == 0 ? "Base address" : numTxsWithOutputs == 0 ? Res.get("funds.deposit.unused") : Res.get("funds.deposit.usedInTx", numTxsWithOutputs);
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ class DepositListItem {
|
||||
private MoneroTxWallet getTxWithFewestConfirmations(List<MoneroTxWallet> allIncomingTxs) {
|
||||
|
||||
// get txs with incoming outputs to subaddress index
|
||||
List<MoneroTxWallet> txs = XmrWalletService.getTxsWithIncomingOutputs(allIncomingTxs, addressEntry.getSubaddressIndex());
|
||||
List<MoneroTxWallet> txs = XmrWalletService.getTxsWithIncomingOutputs(addressEntry.getSubaddressIndex(), allIncomingTxs);
|
||||
|
||||
// get tx with fewest confirmations
|
||||
MoneroTxWallet highestTx = null;
|
||||
|
@ -145,8 +145,8 @@ public class FilterWindow extends Overlay<FilterWindow> {
|
||||
Res.get("filterWindow.seedNode"));
|
||||
InputTextField priceRelayNodesTF = addInputTextField(gridPane, ++rowIndex,
|
||||
Res.get("filterWindow.priceRelayNode"));
|
||||
InputTextField btcNodesTF = addInputTextField(gridPane, ++rowIndex,
|
||||
Res.get("filterWindow.btcNode"));
|
||||
InputTextField xmrNodesTF = addInputTextField(gridPane, ++rowIndex,
|
||||
Res.get("filterWindow.xmrNode"));
|
||||
CheckBox preventPublicBtcNetworkCheckBox = addLabelCheckBox(gridPane, ++rowIndex,
|
||||
Res.get("filterWindow.preventPublicBtcNetwork"));
|
||||
CheckBox disableAutoConfCheckBox = addLabelCheckBox(gridPane, ++rowIndex,
|
||||
@ -177,7 +177,7 @@ public class FilterWindow extends Overlay<FilterWindow> {
|
||||
setupFieldFromList(btcFeeReceiverAddressesTF, filter.getBtcFeeReceiverAddresses());
|
||||
setupFieldFromList(seedNodesTF, filter.getSeedNodes());
|
||||
setupFieldFromList(priceRelayNodesTF, filter.getPriceRelayNodes());
|
||||
setupFieldFromList(btcNodesTF, filter.getBtcNodes());
|
||||
setupFieldFromList(xmrNodesTF, filter.getXmrNodes());
|
||||
setupFieldFromList(bannedPrivilegedDevPubKeysTF, filter.getBannedPrivilegedDevPubKeys());
|
||||
setupFieldFromList(autoConfExplorersTF, filter.getBannedAutoConfExplorers());
|
||||
|
||||
@ -206,7 +206,7 @@ public class FilterWindow extends Overlay<FilterWindow> {
|
||||
readAsList(seedNodesTF),
|
||||
readAsList(priceRelayNodesTF),
|
||||
preventPublicBtcNetworkCheckBox.isSelected(),
|
||||
readAsList(btcNodesTF),
|
||||
readAsList(xmrNodesTF),
|
||||
disableTradeBelowVersionTF.getText(),
|
||||
readAsList(mediatorsTF),
|
||||
readAsList(refundAgentsTF),
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
<TitledGroupBg fx:id="btcHeader" GridPane.rowSpan="5"/>
|
||||
<VBox GridPane.rowIndex="0" GridPane.hgrow="ALWAYS" GridPane.vgrow="SOMETIMES">
|
||||
<AutoTooltipLabel fx:id="bitcoinPeersLabel" styleClass="small-text"/>
|
||||
<AutoTooltipLabel fx:id="moneroPeersLabel" styleClass="small-text"/>
|
||||
<TableView fx:id="moneroPeersTableView">
|
||||
<columns>
|
||||
<TableColumn fx:id="moneroPeerAddressColumn" minWidth="220">
|
||||
@ -70,13 +70,13 @@
|
||||
</TableColumn>
|
||||
</columns>
|
||||
</TableView>
|
||||
<AutoTooltipLabel fx:id="localhostBtcNodeInfoLabel" styleClass="small-text"/>
|
||||
<AutoTooltipLabel fx:id="localhostXmrNodeInfoLabel" styleClass="small-text"/>
|
||||
</VBox>
|
||||
|
||||
<AutoTooltipCheckBox fx:id="useTorForBtcJCheckBox" GridPane.rowIndex="1"/>
|
||||
<AutoTooltipCheckBox fx:id="useTorForXmrJCheckBox" GridPane.rowIndex="1"/>
|
||||
|
||||
<VBox GridPane.rowIndex="2">
|
||||
<AutoTooltipLabel fx:id="bitcoinNodesLabel" styleClass="small-text"/>
|
||||
<AutoTooltipLabel fx:id="moneroNodesLabel" styleClass="small-text"/>
|
||||
<HBox spacing="10">
|
||||
<AutoTooltipRadioButton fx:id="useProvidedNodesRadio"/>
|
||||
<AutoTooltipRadioButton fx:id="useCustomNodesRadio"/>
|
||||
@ -85,8 +85,8 @@
|
||||
</VBox>
|
||||
|
||||
<VBox GridPane.rowIndex="3">
|
||||
<AutoTooltipLabel fx:id="btcNodesLabel" styleClass="small-text"/>
|
||||
<InputTextField fx:id="btcNodesInputTextField"/>
|
||||
<AutoTooltipLabel fx:id="xmrNodesLabel" styleClass="small-text"/>
|
||||
<InputTextField fx:id="xmrNodesInputTextField"/>
|
||||
</VBox>
|
||||
|
||||
<VBox GridPane.rowIndex="4">
|
||||
|
@ -27,7 +27,7 @@ import haveno.core.user.Preferences;
|
||||
import haveno.core.util.FormattingUtils;
|
||||
import haveno.core.util.validation.RegexValidator;
|
||||
import haveno.core.util.validation.RegexValidatorFactory;
|
||||
import haveno.core.xmr.nodes.BtcNodes;
|
||||
import haveno.core.xmr.nodes.XmrNodes;
|
||||
import haveno.core.xmr.nodes.LocalBitcoinNode;
|
||||
import haveno.core.xmr.setup.WalletsSetup;
|
||||
import haveno.desktop.app.HavenoApp;
|
||||
@ -75,15 +75,15 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
@FXML
|
||||
TitledGroupBg p2pHeader, btcHeader;
|
||||
@FXML
|
||||
Label btcNodesLabel, bitcoinNodesLabel, localhostBtcNodeInfoLabel;
|
||||
Label xmrNodesLabel, moneroNodesLabel, localhostXmrNodeInfoLabel;
|
||||
@FXML
|
||||
InputTextField btcNodesInputTextField;
|
||||
InputTextField xmrNodesInputTextField;
|
||||
@FXML
|
||||
TextField onionAddress, sentDataTextField, receivedDataTextField, chainHeightTextField;
|
||||
@FXML
|
||||
Label p2PPeersLabel, bitcoinPeersLabel;
|
||||
Label p2PPeersLabel, moneroPeersLabel;
|
||||
@FXML
|
||||
CheckBox useTorForBtcJCheckBox;
|
||||
CheckBox useTorForXmrJCheckBox;
|
||||
@FXML
|
||||
RadioButton useProvidedNodesRadio, useCustomNodesRadio, usePublicNodesRadio;
|
||||
@FXML
|
||||
@ -102,7 +102,7 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
AutoTooltipButton reSyncSPVChainButton, openTorSettingsButton;
|
||||
|
||||
private final Preferences preferences;
|
||||
private final BtcNodes btcNodes;
|
||||
private final XmrNodes xmrNodes;
|
||||
private final FilterManager filterManager;
|
||||
private final LocalBitcoinNode localBitcoinNode;
|
||||
private final TorNetworkSettingsWindow torNetworkSettingsWindow;
|
||||
@ -121,10 +121,10 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
private Subscription moneroPeersSubscription;
|
||||
private Subscription moneroBlockHeightSubscription;
|
||||
private Subscription nodeAddressSubscription;
|
||||
private ChangeListener<Boolean> btcNodesInputTextFieldFocusListener;
|
||||
private ToggleGroup bitcoinPeersToggleGroup;
|
||||
private BtcNodes.BitcoinNodesOption selectedBitcoinNodesOption;
|
||||
private ChangeListener<Toggle> bitcoinPeersToggleGroupListener;
|
||||
private ChangeListener<Boolean> xmrNodesInputTextFieldFocusListener;
|
||||
private ToggleGroup moneroPeersToggleGroup;
|
||||
private XmrNodes.MoneroNodesOption selectedMoneroNodesOption;
|
||||
private ChangeListener<Toggle> moneroPeersToggleGroupListener;
|
||||
private ChangeListener<Filter> filterPropertyListener;
|
||||
|
||||
@Inject
|
||||
@ -132,7 +132,7 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
P2PService p2PService,
|
||||
CoreMoneroConnectionsService connectionManager,
|
||||
Preferences preferences,
|
||||
BtcNodes btcNodes,
|
||||
XmrNodes xmrNodes,
|
||||
FilterManager filterManager,
|
||||
LocalBitcoinNode localBitcoinNode,
|
||||
TorNetworkSettingsWindow torNetworkSettingsWindow,
|
||||
@ -142,7 +142,7 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
this.p2PService = p2PService;
|
||||
this.connectionManager = connectionManager;
|
||||
this.preferences = preferences;
|
||||
this.btcNodes = btcNodes;
|
||||
this.xmrNodes = xmrNodes;
|
||||
this.filterManager = filterManager;
|
||||
this.localBitcoinNode = localBitcoinNode;
|
||||
this.torNetworkSettingsWindow = torNetworkSettingsWindow;
|
||||
@ -154,16 +154,16 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
btcHeader.setText(Res.get("settings.net.btcHeader"));
|
||||
p2pHeader.setText(Res.get("settings.net.p2pHeader"));
|
||||
onionAddress.setPromptText(Res.get("settings.net.onionAddressLabel"));
|
||||
btcNodesLabel.setText(Res.get("settings.net.btcNodesLabel"));
|
||||
bitcoinPeersLabel.setText(Res.get("settings.net.bitcoinPeersLabel"));
|
||||
useTorForBtcJCheckBox.setText(Res.get("settings.net.useTorForBtcJLabel"));
|
||||
bitcoinNodesLabel.setText(Res.get("settings.net.bitcoinNodesLabel"));
|
||||
xmrNodesLabel.setText(Res.get("settings.net.xmrNodesLabel"));
|
||||
moneroPeersLabel.setText(Res.get("settings.net.moneroPeersLabel"));
|
||||
useTorForXmrJCheckBox.setText(Res.get("settings.net.useTorForXmrJLabel"));
|
||||
moneroNodesLabel.setText(Res.get("settings.net.moneroNodesLabel"));
|
||||
moneroPeerAddressColumn.setGraphic(new AutoTooltipLabel(Res.get("settings.net.onionAddressColumn")));
|
||||
moneroPeerAddressColumn.getStyleClass().add("first-column");
|
||||
moneroPeerVersionColumn.setGraphic(new AutoTooltipLabel(Res.get("settings.net.versionColumn")));
|
||||
moneroPeerSubVersionColumn.setGraphic(new AutoTooltipLabel(Res.get("settings.net.subVersionColumn")));
|
||||
moneroPeerHeightColumn.setGraphic(new AutoTooltipLabel(Res.get("settings.net.heightColumn")));
|
||||
localhostBtcNodeInfoLabel.setText(Res.get("settings.net.localhostBtcNodeInfo"));
|
||||
localhostXmrNodeInfoLabel.setText(Res.get("settings.net.localhostXmrNodeInfo"));
|
||||
useProvidedNodesRadio.setText(Res.get("settings.net.useProvidedNodesRadio"));
|
||||
useCustomNodesRadio.setText(Res.get("settings.net.useCustomNodesRadio"));
|
||||
usePublicNodesRadio.setText(Res.get("settings.net.usePublicNodesRadio"));
|
||||
@ -184,8 +184,8 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
peerTypeColumn.getStyleClass().add("last-column");
|
||||
openTorSettingsButton.updateText(Res.get("settings.net.openTorSettingsButton"));
|
||||
|
||||
GridPane.setMargin(bitcoinPeersLabel, new Insets(4, 0, 0, 0));
|
||||
GridPane.setValignment(bitcoinPeersLabel, VPos.TOP);
|
||||
GridPane.setMargin(moneroPeersLabel, new Insets(4, 0, 0, 0));
|
||||
GridPane.setValignment(moneroPeersLabel, VPos.TOP);
|
||||
|
||||
GridPane.setMargin(p2PPeersLabel, new Insets(4, 0, 0, 0));
|
||||
GridPane.setValignment(p2PPeersLabel, VPos.TOP);
|
||||
@ -205,44 +205,45 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
p2pPeersTableView.getSortOrder().add(creationDateColumn);
|
||||
creationDateColumn.setSortType(TableColumn.SortType.ASCENDING);
|
||||
|
||||
bitcoinPeersToggleGroup = new ToggleGroup();
|
||||
useProvidedNodesRadio.setToggleGroup(bitcoinPeersToggleGroup);
|
||||
useCustomNodesRadio.setToggleGroup(bitcoinPeersToggleGroup);
|
||||
usePublicNodesRadio.setToggleGroup(bitcoinPeersToggleGroup);
|
||||
moneroPeersToggleGroup = new ToggleGroup();
|
||||
useProvidedNodesRadio.setToggleGroup(moneroPeersToggleGroup);
|
||||
useCustomNodesRadio.setToggleGroup(moneroPeersToggleGroup);
|
||||
usePublicNodesRadio.setToggleGroup(moneroPeersToggleGroup);
|
||||
|
||||
useProvidedNodesRadio.setUserData(BtcNodes.BitcoinNodesOption.PROVIDED);
|
||||
useCustomNodesRadio.setUserData(BtcNodes.BitcoinNodesOption.CUSTOM);
|
||||
usePublicNodesRadio.setUserData(BtcNodes.BitcoinNodesOption.PUBLIC);
|
||||
useProvidedNodesRadio.setUserData(XmrNodes.MoneroNodesOption.PROVIDED);
|
||||
useCustomNodesRadio.setUserData(XmrNodes.MoneroNodesOption.CUSTOM);
|
||||
usePublicNodesRadio.setUserData(XmrNodes.MoneroNodesOption.PUBLIC);
|
||||
|
||||
selectedBitcoinNodesOption = BtcNodes.BitcoinNodesOption.values()[preferences.getBitcoinNodesOptionOrdinal()];
|
||||
selectedMoneroNodesOption = XmrNodes.MoneroNodesOption.values()[preferences.getMoneroNodesOptionOrdinal()];
|
||||
// In case CUSTOM is selected but no custom nodes are set or
|
||||
// in case PUBLIC is selected but we blocked it (B2X risk) we revert to provided nodes
|
||||
if ((selectedBitcoinNodesOption == BtcNodes.BitcoinNodesOption.CUSTOM &&
|
||||
(preferences.getBitcoinNodes() == null || preferences.getBitcoinNodes().isEmpty())) ||
|
||||
(selectedBitcoinNodesOption == BtcNodes.BitcoinNodesOption.PUBLIC && isPreventPublicBtcNetwork())) {
|
||||
selectedBitcoinNodesOption = BtcNodes.BitcoinNodesOption.PROVIDED;
|
||||
preferences.setBitcoinNodesOptionOrdinal(selectedBitcoinNodesOption.ordinal());
|
||||
if ((selectedMoneroNodesOption == XmrNodes.MoneroNodesOption.CUSTOM &&
|
||||
(preferences.getMoneroNodes() == null || preferences.getMoneroNodes().isEmpty())) ||
|
||||
(selectedMoneroNodesOption == XmrNodes.MoneroNodesOption.PUBLIC && isPreventPublicXmrNetwork())) {
|
||||
selectedMoneroNodesOption = XmrNodes.MoneroNodesOption.PROVIDED;
|
||||
preferences.setMoneroNodesOptionOrdinal(selectedMoneroNodesOption.ordinal());
|
||||
}
|
||||
|
||||
selectBitcoinPeersToggle();
|
||||
onBitcoinPeersToggleSelected(false);
|
||||
selectMoneroPeersToggle();
|
||||
onMoneroPeersToggleSelected(false);
|
||||
|
||||
bitcoinPeersToggleGroupListener = (observable, oldValue, newValue) -> {
|
||||
moneroPeersToggleGroupListener = (observable, oldValue, newValue) -> {
|
||||
if (newValue != null) {
|
||||
selectedBitcoinNodesOption = (BtcNodes.BitcoinNodesOption) newValue.getUserData();
|
||||
onBitcoinPeersToggleSelected(true);
|
||||
selectedMoneroNodesOption = (XmrNodes.MoneroNodesOption) newValue.getUserData();
|
||||
onMoneroPeersToggleSelected(true);
|
||||
}
|
||||
};
|
||||
|
||||
btcNodesInputTextField.setPromptText(Res.get("settings.net.ips"));
|
||||
xmrNodesInputTextField.setPromptText(Res.get("settings.net.ips"));
|
||||
RegexValidator regexValidator = RegexValidatorFactory.addressRegexValidator();
|
||||
btcNodesInputTextField.setValidator(regexValidator);
|
||||
btcNodesInputTextField.setErrorMessage(Res.get("validation.invalidAddressList"));
|
||||
btcNodesInputTextFieldFocusListener = (observable, oldValue, newValue) -> {
|
||||
xmrNodesInputTextField.setValidator(regexValidator);
|
||||
xmrNodesInputTextField.setErrorMessage(Res.get("validation.invalidAddressList"));
|
||||
xmrNodesInputTextFieldFocusListener = (observable, oldValue, newValue) -> {
|
||||
if (oldValue && !newValue
|
||||
&& !btcNodesInputTextField.getText().equals(preferences.getBitcoinNodes())
|
||||
&& btcNodesInputTextField.validate()) {
|
||||
preferences.setBitcoinNodes(btcNodesInputTextField.getText());
|
||||
&& !xmrNodesInputTextField.getText().equals(preferences.getMoneroNodes())
|
||||
&& xmrNodesInputTextField.validate()) {
|
||||
preferences.setMoneroNodes(xmrNodesInputTextField.getText());
|
||||
preferences.setMoneroNodesOptionOrdinal(selectedMoneroNodesOption.ordinal());
|
||||
showShutDownPopup();
|
||||
}
|
||||
};
|
||||
@ -259,25 +260,25 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
|
||||
@Override
|
||||
public void activate() {
|
||||
bitcoinPeersToggleGroup.selectedToggleProperty().addListener(bitcoinPeersToggleGroupListener);
|
||||
moneroPeersToggleGroup.selectedToggleProperty().addListener(moneroPeersToggleGroupListener);
|
||||
|
||||
if (filterManager.getFilter() != null)
|
||||
applyPreventPublicBtcNetwork();
|
||||
|
||||
filterManager.filterProperty().addListener(filterPropertyListener);
|
||||
|
||||
useTorForBtcJCheckBox.setSelected(preferences.getUseTorForBitcoinJ());
|
||||
useTorForBtcJCheckBox.setOnAction(event -> {
|
||||
boolean selected = useTorForBtcJCheckBox.isSelected();
|
||||
if (selected != preferences.getUseTorForBitcoinJ()) {
|
||||
useTorForXmrJCheckBox.setSelected(preferences.getUseTorForMonero());
|
||||
useTorForXmrJCheckBox.setOnAction(event -> {
|
||||
boolean selected = useTorForXmrJCheckBox.isSelected();
|
||||
if (selected != preferences.getUseTorForMonero()) {
|
||||
new Popup().information(Res.get("settings.net.needRestart"))
|
||||
.actionButtonText(Res.get("shared.applyAndShutDown"))
|
||||
.onAction(() -> {
|
||||
preferences.setUseTorForBitcoinJ(selected);
|
||||
preferences.setUseTorForMonero(selected);
|
||||
UserThread.runAfter(HavenoApp.getShutDownHandler(), 500, TimeUnit.MILLISECONDS);
|
||||
})
|
||||
.closeButtonText(Res.get("shared.cancel"))
|
||||
.onClose(() -> useTorForBtcJCheckBox.setSelected(!selected))
|
||||
.onClose(() -> useTorForXmrJCheckBox.setSelected(!selected))
|
||||
.show();
|
||||
}
|
||||
});
|
||||
@ -314,19 +315,19 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
p2pSortedList.comparatorProperty().bind(p2pPeersTableView.comparatorProperty());
|
||||
p2pPeersTableView.setItems(p2pSortedList);
|
||||
|
||||
btcNodesInputTextField.setText(preferences.getBitcoinNodes());
|
||||
xmrNodesInputTextField.setText(preferences.getMoneroNodes());
|
||||
|
||||
btcNodesInputTextField.focusedProperty().addListener(btcNodesInputTextFieldFocusListener);
|
||||
xmrNodesInputTextField.focusedProperty().addListener(xmrNodesInputTextFieldFocusListener);
|
||||
|
||||
openTorSettingsButton.setOnAction(e -> torNetworkSettingsWindow.show());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deactivate() {
|
||||
bitcoinPeersToggleGroup.selectedToggleProperty().removeListener(bitcoinPeersToggleGroupListener);
|
||||
moneroPeersToggleGroup.selectedToggleProperty().removeListener(moneroPeersToggleGroupListener);
|
||||
filterManager.filterProperty().removeListener(filterPropertyListener);
|
||||
|
||||
useTorForBtcJCheckBox.setOnAction(null);
|
||||
useTorForXmrJCheckBox.setOnAction(null);
|
||||
|
||||
if (nodeAddressSubscription != null)
|
||||
nodeAddressSubscription.unsubscribe();
|
||||
@ -346,29 +347,27 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
moneroSortedList.comparatorProperty().unbind();
|
||||
p2pSortedList.comparatorProperty().unbind();
|
||||
p2pPeersTableView.getItems().forEach(P2pNetworkListItem::cleanup);
|
||||
btcNodesInputTextField.focusedProperty().removeListener(btcNodesInputTextFieldFocusListener);
|
||||
xmrNodesInputTextField.focusedProperty().removeListener(xmrNodesInputTextFieldFocusListener);
|
||||
|
||||
openTorSettingsButton.setOnAction(null);
|
||||
}
|
||||
|
||||
private boolean isPreventPublicBtcNetwork() {
|
||||
return true;
|
||||
//TODO: re-enable it if we are able to check for core nodes that have the correct configuration
|
||||
// return filterManager.getFilter() != null &&
|
||||
// filterManager.getFilter().isPreventPublicBtcNetwork();
|
||||
private boolean isPreventPublicXmrNetwork() {
|
||||
return filterManager.getFilter() != null &&
|
||||
filterManager.getFilter().isPreventPublicBtcNetwork();
|
||||
}
|
||||
|
||||
private void selectBitcoinPeersToggle() {
|
||||
switch (selectedBitcoinNodesOption) {
|
||||
private void selectMoneroPeersToggle() {
|
||||
switch (selectedMoneroNodesOption) {
|
||||
case CUSTOM:
|
||||
bitcoinPeersToggleGroup.selectToggle(useCustomNodesRadio);
|
||||
moneroPeersToggleGroup.selectToggle(useCustomNodesRadio);
|
||||
break;
|
||||
case PUBLIC:
|
||||
bitcoinPeersToggleGroup.selectToggle(usePublicNodesRadio);
|
||||
moneroPeersToggleGroup.selectToggle(usePublicNodesRadio);
|
||||
break;
|
||||
default:
|
||||
case PROVIDED:
|
||||
bitcoinPeersToggleGroup.selectToggle(useProvidedNodesRadio);
|
||||
moneroPeersToggleGroup.selectToggle(useProvidedNodesRadio);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -381,28 +380,28 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
.show();
|
||||
}
|
||||
|
||||
private void onBitcoinPeersToggleSelected(boolean calledFromUser) {
|
||||
private void onMoneroPeersToggleSelected(boolean calledFromUser) {
|
||||
boolean localBitcoinNodeShouldBeUsed = localBitcoinNode.shouldBeUsed();
|
||||
useTorForBtcJCheckBox.setDisable(localBitcoinNodeShouldBeUsed);
|
||||
bitcoinNodesLabel.setDisable(localBitcoinNodeShouldBeUsed);
|
||||
btcNodesLabel.setDisable(localBitcoinNodeShouldBeUsed);
|
||||
btcNodesInputTextField.setDisable(localBitcoinNodeShouldBeUsed);
|
||||
useProvidedNodesRadio.setDisable(localBitcoinNodeShouldBeUsed || !btcNodes.useProvidedBtcNodes());
|
||||
useTorForXmrJCheckBox.setDisable(localBitcoinNodeShouldBeUsed);
|
||||
moneroNodesLabel.setDisable(localBitcoinNodeShouldBeUsed);
|
||||
xmrNodesLabel.setDisable(localBitcoinNodeShouldBeUsed);
|
||||
xmrNodesInputTextField.setDisable(localBitcoinNodeShouldBeUsed);
|
||||
useProvidedNodesRadio.setDisable(localBitcoinNodeShouldBeUsed);
|
||||
useCustomNodesRadio.setDisable(localBitcoinNodeShouldBeUsed);
|
||||
usePublicNodesRadio.setDisable(localBitcoinNodeShouldBeUsed || isPreventPublicBtcNetwork());
|
||||
usePublicNodesRadio.setDisable(localBitcoinNodeShouldBeUsed || isPreventPublicXmrNetwork());
|
||||
|
||||
BtcNodes.BitcoinNodesOption currentBitcoinNodesOption = BtcNodes.BitcoinNodesOption.values()[preferences.getBitcoinNodesOptionOrdinal()];
|
||||
XmrNodes.MoneroNodesOption currentBitcoinNodesOption = XmrNodes.MoneroNodesOption.values()[preferences.getMoneroNodesOptionOrdinal()];
|
||||
|
||||
switch (selectedBitcoinNodesOption) {
|
||||
switch (selectedMoneroNodesOption) {
|
||||
case CUSTOM:
|
||||
btcNodesInputTextField.setDisable(false);
|
||||
btcNodesLabel.setDisable(false);
|
||||
if (!btcNodesInputTextField.getText().isEmpty()
|
||||
&& btcNodesInputTextField.validate()
|
||||
&& currentBitcoinNodesOption != BtcNodes.BitcoinNodesOption.CUSTOM) {
|
||||
preferences.setBitcoinNodesOptionOrdinal(selectedBitcoinNodesOption.ordinal());
|
||||
xmrNodesInputTextField.setDisable(false);
|
||||
xmrNodesLabel.setDisable(false);
|
||||
if (!xmrNodesInputTextField.getText().isEmpty()
|
||||
&& xmrNodesInputTextField.validate()
|
||||
&& currentBitcoinNodesOption != XmrNodes.MoneroNodesOption.CUSTOM) {
|
||||
preferences.setMoneroNodesOptionOrdinal(selectedMoneroNodesOption.ordinal());
|
||||
if (calledFromUser) {
|
||||
if (isPreventPublicBtcNetwork()) {
|
||||
if (isPreventPublicXmrNetwork()) {
|
||||
new Popup().warning(Res.get("settings.net.warn.useCustomNodes.B2XWarning"))
|
||||
.onAction(() -> UserThread.runAfter(this::showShutDownPopup, 300, TimeUnit.MILLISECONDS)).show();
|
||||
} else {
|
||||
@ -412,19 +411,19 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
}
|
||||
break;
|
||||
case PUBLIC:
|
||||
btcNodesInputTextField.setDisable(true);
|
||||
btcNodesLabel.setDisable(true);
|
||||
if (currentBitcoinNodesOption != BtcNodes.BitcoinNodesOption.PUBLIC) {
|
||||
preferences.setBitcoinNodesOptionOrdinal(selectedBitcoinNodesOption.ordinal());
|
||||
xmrNodesInputTextField.setDisable(true);
|
||||
xmrNodesLabel.setDisable(true);
|
||||
if (currentBitcoinNodesOption != XmrNodes.MoneroNodesOption.PUBLIC) {
|
||||
preferences.setMoneroNodesOptionOrdinal(selectedMoneroNodesOption.ordinal());
|
||||
if (calledFromUser) {
|
||||
new Popup()
|
||||
.warning(Res.get("settings.net.warn.usePublicNodes"))
|
||||
.actionButtonText(Res.get("settings.net.warn.usePublicNodes.useProvided"))
|
||||
.onAction(() -> UserThread.runAfter(() -> {
|
||||
selectedBitcoinNodesOption = BtcNodes.BitcoinNodesOption.PROVIDED;
|
||||
preferences.setBitcoinNodesOptionOrdinal(selectedBitcoinNodesOption.ordinal());
|
||||
selectBitcoinPeersToggle();
|
||||
onBitcoinPeersToggleSelected(false);
|
||||
selectedMoneroNodesOption = XmrNodes.MoneroNodesOption.PROVIDED;
|
||||
preferences.setMoneroNodesOptionOrdinal(selectedMoneroNodesOption.ordinal());
|
||||
selectMoneroPeersToggle();
|
||||
onMoneroPeersToggleSelected(false);
|
||||
}, 300, TimeUnit.MILLISECONDS))
|
||||
.closeButtonText(Res.get("settings.net.warn.usePublicNodes.usePublic"))
|
||||
.onClose(() -> UserThread.runAfter(this::showShutDownPopup, 300, TimeUnit.MILLISECONDS))
|
||||
@ -434,20 +433,13 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
break;
|
||||
default:
|
||||
case PROVIDED:
|
||||
if (btcNodes.useProvidedBtcNodes()) {
|
||||
btcNodesInputTextField.setDisable(true);
|
||||
btcNodesLabel.setDisable(true);
|
||||
if (currentBitcoinNodesOption != BtcNodes.BitcoinNodesOption.PROVIDED) {
|
||||
preferences.setBitcoinNodesOptionOrdinal(selectedBitcoinNodesOption.ordinal());
|
||||
if (calledFromUser) {
|
||||
showShutDownPopup();
|
||||
}
|
||||
xmrNodesInputTextField.setDisable(true);
|
||||
xmrNodesLabel.setDisable(true);
|
||||
if (currentBitcoinNodesOption != XmrNodes.MoneroNodesOption.PROVIDED) {
|
||||
preferences.setMoneroNodesOptionOrdinal(selectedMoneroNodesOption.ordinal());
|
||||
if (calledFromUser) {
|
||||
showShutDownPopup();
|
||||
}
|
||||
} else {
|
||||
selectedBitcoinNodesOption = BtcNodes.BitcoinNodesOption.PUBLIC;
|
||||
preferences.setBitcoinNodesOptionOrdinal(selectedBitcoinNodesOption.ordinal());
|
||||
selectBitcoinPeersToggle();
|
||||
onBitcoinPeersToggleSelected(false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -455,13 +447,13 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
|
||||
|
||||
private void applyPreventPublicBtcNetwork() {
|
||||
final boolean preventPublicBtcNetwork = isPreventPublicBtcNetwork();
|
||||
final boolean preventPublicBtcNetwork = isPreventPublicXmrNetwork();
|
||||
usePublicNodesRadio.setDisable(localBitcoinNode.shouldBeUsed() || preventPublicBtcNetwork);
|
||||
if (preventPublicBtcNetwork && selectedBitcoinNodesOption == BtcNodes.BitcoinNodesOption.PUBLIC) {
|
||||
selectedBitcoinNodesOption = BtcNodes.BitcoinNodesOption.PROVIDED;
|
||||
preferences.setBitcoinNodesOptionOrdinal(selectedBitcoinNodesOption.ordinal());
|
||||
selectBitcoinPeersToggle();
|
||||
onBitcoinPeersToggleSelected(false);
|
||||
if (preventPublicBtcNetwork && selectedMoneroNodesOption == XmrNodes.MoneroNodesOption.PUBLIC) {
|
||||
selectedMoneroNodesOption = XmrNodes.MoneroNodesOption.PROVIDED;
|
||||
preferences.setMoneroNodesOptionOrdinal(selectedMoneroNodesOption.ordinal());
|
||||
selectMoneroPeersToggle();
|
||||
onMoneroPeersToggleSelected(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -475,9 +467,11 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
||||
|
||||
private void updateMoneroPeersTable(List<MoneroPeer> peers) {
|
||||
moneroNetworkListItems.clear();
|
||||
moneroNetworkListItems.setAll(peers.stream()
|
||||
.map(MoneroNetworkListItem::new)
|
||||
.collect(Collectors.toList()));
|
||||
if (peers != null) {
|
||||
moneroNetworkListItems.setAll(peers.stream()
|
||||
.map(MoneroNetworkListItem::new)
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
|
||||
private void updateChainHeightTextField(Number chainHeight) {
|
||||
|
@ -563,7 +563,7 @@ message Filter {
|
||||
repeated string seed_nodes = 10;
|
||||
repeated string price_relay_nodes = 11;
|
||||
bool prevent_public_btc_network = 12;
|
||||
repeated string btc_nodes = 13;
|
||||
repeated string xmr_nodes = 13;
|
||||
string disable_trade_below_version = 14;
|
||||
repeated string mediators = 15;
|
||||
repeated string refundAgents = 16;
|
||||
@ -1660,7 +1660,7 @@ message PreferencesPayload {
|
||||
bool auto_select_arbitrators = 8;
|
||||
map<string, bool> dont_show_again_map = 9;
|
||||
bool tac_accepted = 10;
|
||||
bool use_tor_for_bitcoin_j = 11;
|
||||
bool use_tor_for_monero = 11;
|
||||
bool show_own_offers_in_offer_book = 12;
|
||||
TradeCurrency preferred_trade_currency = 13;
|
||||
int64 withdrawal_tx_fee_in_vbytes = 14;
|
||||
@ -1671,11 +1671,11 @@ message PreferencesPayload {
|
||||
string buy_screen_currency_code = 19;
|
||||
string sell_screen_currency_code = 20;
|
||||
int32 trade_statistics_tick_unit_index = 21;
|
||||
bool resync_Spv_requested = 22;
|
||||
bool resync_spv_requested = 22;
|
||||
bool sort_market_currencies_numerically = 23;
|
||||
bool use_percentage_based_price = 24;
|
||||
map<string, string> peer_tag_map = 25;
|
||||
string bitcoin_nodes = 26;
|
||||
string monero_nodes = 26;
|
||||
repeated string ignore_traders_list = 27;
|
||||
string directory_chooser_path = 28;
|
||||
bool use_animations = 29;
|
||||
@ -1684,7 +1684,7 @@ message PreferencesPayload {
|
||||
int32 bridge_option_ordinal = 32;
|
||||
int32 tor_transport_ordinal = 33;
|
||||
string custom_bridges = 34;
|
||||
int32 bitcoin_nodes_option_ordinal = 35;
|
||||
int32 monero_nodes_option_ordinal = 35;
|
||||
string referral_id = 36;
|
||||
string phone_key_and_token = 37;
|
||||
bool use_sound_for_mobile_notifications = 38;
|
||||
|
Loading…
Reference in New Issue
Block a user