mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
don't try to start local node if seed node
This commit is contained in:
parent
1e5b3dc9d7
commit
34f68c474a
@ -440,7 +440,7 @@ public final class CoreMoneroConnectionsService {
|
||||
else connectionManager.setAutoSwitch(true);
|
||||
|
||||
// start local node if used last and offline
|
||||
startLocalNodeIfUsedLast();
|
||||
maybeStartLocalNode();
|
||||
|
||||
// update connection
|
||||
if (connectionManager.getConnection() == null || connectionManager.getAutoSwitch()) {
|
||||
@ -457,7 +457,7 @@ public final class CoreMoneroConnectionsService {
|
||||
connectionManager.setConnection(connection);
|
||||
|
||||
// start local node if used last and offline
|
||||
startLocalNodeIfUsedLast();
|
||||
maybeStartLocalNode();
|
||||
|
||||
// update connection
|
||||
checkConnection();
|
||||
@ -472,7 +472,10 @@ public final class CoreMoneroConnectionsService {
|
||||
}
|
||||
}
|
||||
|
||||
private void startLocalNodeIfUsedLast() {
|
||||
private void maybeStartLocalNode() {
|
||||
|
||||
// skip if seed node
|
||||
if (HavenoUtils.havenoSetup == null) return;
|
||||
|
||||
// start local node if offline and used as last connection
|
||||
if (connectionManager.getConnection() != null && nodeService.equalsUri(connectionManager.getConnection().getUri()) && !nodeService.isOnline()) {
|
||||
|
@ -74,7 +74,7 @@ public class HavenoUtils {
|
||||
private static final int POOL_SIZE = 10;
|
||||
private static final ExecutorService POOL = Executors.newFixedThreadPool(POOL_SIZE);
|
||||
|
||||
// TODO: better way to share refernces?
|
||||
// TODO: better way to share references?
|
||||
public static ArbitrationManager arbitrationManager;
|
||||
public static HavenoSetup havenoSetup;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user