diff --git a/core/src/main/java/bisq/core/btc/setup/WalletConfig.java b/core/src/main/java/bisq/core/btc/setup/WalletConfig.java index 10636844b8c..b55c00b4856 100644 --- a/core/src/main/java/bisq/core/btc/setup/WalletConfig.java +++ b/core/src/main/java/bisq/core/btc/setup/WalletConfig.java @@ -456,8 +456,7 @@ private PeerGroup createPeerGroup() { } else { // proxy case (tor). Proxy proxy = new Proxy(Proxy.Type.SOCKS, - new InetSocketAddress(socks5Proxy.getInetAddress().getHostName(), - socks5Proxy.getPort())); + new InetSocketAddress(socks5Proxy.getInetAddress(), socks5Proxy.getPort())); ProxySocketFactory proxySocketFactory = new ProxySocketFactory(proxy); // We don't use tor mode if we have a local node running diff --git a/core/src/test/java/bisq/core/btc/nodes/BtcNodeConverterTest.java b/core/src/test/java/bisq/core/btc/nodes/BtcNodeConverterTest.java index 61e709dc995..7b7d4e1f5a5 100644 --- a/core/src/test/java/bisq/core/btc/nodes/BtcNodeConverterTest.java +++ b/core/src/test/java/bisq/core/btc/nodes/BtcNodeConverterTest.java @@ -27,7 +27,6 @@ import com.runjva.sourceforge.jsocks.protocol.Socks5Proxy; import java.net.InetAddress; -import java.net.UnknownHostException; import org.junit.Test; @@ -39,7 +38,7 @@ public class BtcNodeConverterTest { @Test - public void testConvertOnionHost() throws UnknownHostException { + public void testConvertOnionHost() { BtcNode node = mock(BtcNode.class); when(node.getOnionAddress()).thenReturn("aaa.onion"); @@ -63,7 +62,7 @@ public void testConvertClearNode() { PeerAddress peerAddress = new BtcNodeConverter().convertClearNode(node); // noinspection ConstantConditions InetAddress inetAddress = peerAddress.getAddr(); - assertEquals(ip, inetAddress.getHostName()); + assertEquals(ip, inetAddress.getHostAddress()); } @Test