mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-27 08:19:41 -05:00
fix connection to custom node on startup #945
This commit is contained in:
parent
1150d929af
commit
9cd28a6bde
@ -459,8 +459,11 @@ public final class XmrConnectionService {
|
||||
}
|
||||
|
||||
// restore last connection
|
||||
if (connectionList.getCurrentConnectionUri().isPresent() && connectionManager.hasConnection(connectionList.getCurrentConnectionUri().get())) {
|
||||
if (!HavenoUtils.isLocalHost(connectionList.getCurrentConnectionUri().get()) || !xmrLocalNode.shouldBeIgnored()) {
|
||||
if (isFixedConnection()) {
|
||||
if (getConnections().size() != 1) throw new IllegalStateException("Expected connection list to have 1 fixed connection but was: " + getConnections().size());
|
||||
connectionManager.setConnection(getConnections().get(0));
|
||||
} else if (connectionList.getCurrentConnectionUri().isPresent() && connectionManager.hasConnection(connectionList.getCurrentConnectionUri().get())) {
|
||||
if (!xmrLocalNode.shouldBeIgnored() || !xmrLocalNode.equalsUri(connectionList.getCurrentConnectionUri().get())) {
|
||||
connectionManager.setConnection(connectionList.getCurrentConnectionUri().get());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user