mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-23 03:59:36 +00:00
fixes for local monerod
This commit is contained in:
parent
947caca647
commit
75e85179b4
3 changed files with 4 additions and 4 deletions
|
@ -3,7 +3,6 @@ package haveno.core.api;
|
||||||
import haveno.common.ThreadUtils;
|
import haveno.common.ThreadUtils;
|
||||||
import haveno.common.UserThread;
|
import haveno.common.UserThread;
|
||||||
import haveno.common.app.DevEnv;
|
import haveno.common.app.DevEnv;
|
||||||
import haveno.common.config.BaseCurrencyNetwork;
|
|
||||||
import haveno.common.config.Config;
|
import haveno.common.config.Config;
|
||||||
import haveno.core.trade.HavenoUtils;
|
import haveno.core.trade.HavenoUtils;
|
||||||
import haveno.core.user.Preferences;
|
import haveno.core.user.Preferences;
|
||||||
|
@ -612,8 +611,7 @@ public final class XmrConnectionService {
|
||||||
chainHeight.set(lastInfo.getHeight());
|
chainHeight.set(lastInfo.getHeight());
|
||||||
|
|
||||||
// update sync progress
|
// update sync progress
|
||||||
boolean isTestnet = Config.baseCurrencyNetwork() == BaseCurrencyNetwork.XMR_LOCAL;
|
if (lastInfo.isSynchronized()) doneDownload();
|
||||||
if (lastInfo.isSynchronized() || isTestnet) doneDownload(); // TODO: skipping synchronized check for testnet because tests cannot sync 3rd local node, see "Can manage Monero daemon connections"
|
|
||||||
else if (lastInfo.isBusySyncing()) {
|
else if (lastInfo.isBusySyncing()) {
|
||||||
long targetHeight = lastInfo.getTargetHeight();
|
long targetHeight = lastInfo.getTargetHeight();
|
||||||
long blocksLeft = targetHeight - lastInfo.getHeight();
|
long blocksLeft = targetHeight - lastInfo.getHeight();
|
||||||
|
|
|
@ -61,6 +61,8 @@ public class XmrLocalNode {
|
||||||
MONEROD_ARGS.add(MONEROD_PATH);
|
MONEROD_ARGS.add(MONEROD_PATH);
|
||||||
MONEROD_ARGS.add("--no-igd");
|
MONEROD_ARGS.add("--no-igd");
|
||||||
MONEROD_ARGS.add("--hide-my-port");
|
MONEROD_ARGS.add("--hide-my-port");
|
||||||
|
MONEROD_ARGS.add("--p2p-bind-ip");
|
||||||
|
MONEROD_ARGS.add(HavenoUtils.LOOPBACK_HOST);
|
||||||
if (!Config.baseCurrencyNetwork().isMainnet()) MONEROD_ARGS.add("--" + Config.baseCurrencyNetwork().getNetwork().toLowerCase());
|
if (!Config.baseCurrencyNetwork().isMainnet()) MONEROD_ARGS.add("--" + Config.baseCurrencyNetwork().getNetwork().toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class XmrNodeSettings implements PersistableEnvelope {
|
||||||
public protobuf.XmrNodeSettings toProtoMessage() {
|
public protobuf.XmrNodeSettings toProtoMessage() {
|
||||||
protobuf.XmrNodeSettings.Builder builder = protobuf.XmrNodeSettings.newBuilder();
|
protobuf.XmrNodeSettings.Builder builder = protobuf.XmrNodeSettings.newBuilder();
|
||||||
Optional.ofNullable(blockchainPath).ifPresent(e -> builder.setBlockchainPath(blockchainPath));
|
Optional.ofNullable(blockchainPath).ifPresent(e -> builder.setBlockchainPath(blockchainPath));
|
||||||
Optional.ofNullable(bootstrapUrl).ifPresent(e -> builder.setBlockchainPath(bootstrapUrl));
|
Optional.ofNullable(bootstrapUrl).ifPresent(e -> builder.setBootstrapUrl(bootstrapUrl));
|
||||||
Optional.ofNullable(startupFlags).ifPresent(e -> builder.addAllStartupFlags(startupFlags));
|
Optional.ofNullable(startupFlags).ifPresent(e -> builder.addAllStartupFlags(startupFlags));
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue