mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
fixes for local monerod
This commit is contained in:
parent
947caca647
commit
75e85179b4
@ -3,7 +3,6 @@ package haveno.core.api;
|
||||
import haveno.common.ThreadUtils;
|
||||
import haveno.common.UserThread;
|
||||
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;
|
||||
@ -612,8 +611,7 @@ public final class XmrConnectionService {
|
||||
chainHeight.set(lastInfo.getHeight());
|
||||
|
||||
// update sync progress
|
||||
boolean isTestnet = Config.baseCurrencyNetwork() == BaseCurrencyNetwork.XMR_LOCAL;
|
||||
if (lastInfo.isSynchronized() || isTestnet) doneDownload(); // TODO: skipping synchronized check for testnet because tests cannot sync 3rd local node, see "Can manage Monero daemon connections"
|
||||
if (lastInfo.isSynchronized()) doneDownload();
|
||||
else if (lastInfo.isBusySyncing()) {
|
||||
long targetHeight = lastInfo.getTargetHeight();
|
||||
long blocksLeft = targetHeight - lastInfo.getHeight();
|
||||
|
@ -61,6 +61,8 @@ public class XmrLocalNode {
|
||||
MONEROD_ARGS.add(MONEROD_PATH);
|
||||
MONEROD_ARGS.add("--no-igd");
|
||||
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());
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class XmrNodeSettings implements PersistableEnvelope {
|
||||
public protobuf.XmrNodeSettings toProtoMessage() {
|
||||
protobuf.XmrNodeSettings.Builder builder = protobuf.XmrNodeSettings.newBuilder();
|
||||
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));
|
||||
return builder.build();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user