mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Replace "localhost" strings with InetAddress.getLoopbackAddress calls
This commit is contained in:
parent
304047eaca
commit
899bea8df5
@ -27,6 +27,8 @@ import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import java.net.InetAddress;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import java.io.File;
|
||||
@ -169,7 +171,7 @@ public class ApiTestConfig {
|
||||
ArgumentAcceptingOptionSpec<String> bitcoinRegtestHostOpt =
|
||||
parser.accepts(BITCOIN_REGTEST_HOST, "Bitcoin Core regtest host")
|
||||
.withRequiredArg()
|
||||
.ofType(String.class).defaultsTo("localhost");
|
||||
.ofType(String.class).defaultsTo(InetAddress.getLoopbackAddress().getHostAddress());
|
||||
|
||||
ArgumentAcceptingOptionSpec<Integer> bitcoinRpcPortOpt =
|
||||
parser.accepts(BITCOIN_RPC_PORT, "Bitcoin Core rpc port (non-default)")
|
||||
|
@ -17,6 +17,8 @@
|
||||
|
||||
package bisq.apitest;
|
||||
|
||||
import java.net.InetAddress;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
@ -69,16 +71,16 @@ public class ApiTestCase {
|
||||
scaffold = new Scaffold(supportingApps).setUp();
|
||||
config = scaffold.config;
|
||||
bitcoinCli = new BitcoinCliHelper((config));
|
||||
// For now, all grpc requests are sent to the alicedaemon, but this will need to
|
||||
// be made configurable for new test cases that call arb or bob node daemons.
|
||||
grpcStubs = new GrpcStubs("localhost", alicedaemon.apiPort, config.apiPassword);
|
||||
grpcStubs = new GrpcStubs(InetAddress.getLoopbackAddress().getHostAddress(),
|
||||
alicedaemon.apiPort, config.apiPassword);
|
||||
}
|
||||
|
||||
public static void setUpScaffold(String[] params)
|
||||
throws InterruptedException, ExecutionException, IOException {
|
||||
scaffold = new Scaffold(params).setUp();
|
||||
config = scaffold.config;
|
||||
grpcStubs = new GrpcStubs("localhost", alicedaemon.apiPort, config.apiPassword);
|
||||
grpcStubs = new GrpcStubs(InetAddress.getLoopbackAddress().getHostAddress(),
|
||||
alicedaemon.apiPort, config.apiPassword);
|
||||
}
|
||||
|
||||
public static void tearDownScaffold() {
|
||||
|
Loading…
Reference in New Issue
Block a user