From 93ba0b0eca1a64c8b27775cb7c87fd64ab666838 Mon Sep 17 00:00:00 2001 From: Alva Swanson Date: Sun, 2 Jul 2023 16:18:30 +0200 Subject: [PATCH 1/2] Rename DirectoryAuthority to TorNode --- .../DirectoryAuthorityKeyGenerationTests.java | 4 ++-- .../DirectoryAuthorityTests.java | 14 ++++++------- .../da/DirectoryAuthorityFactory.java | 4 ++-- .../{DirectoryAuthority.java => TorNode.java} | 4 ++-- .../da/keygen/RelayKeyGenProcess.java | 6 +++--- .../DirectoryAuthorityKeyGenerator.java | 4 ++-- .../torrc/CommonTorrcGenerator.java | 20 +++++++++---------- .../DirectoryAuthorityTorrcGenerator.java | 8 ++++---- .../torrc/RelayTorrcGenerator.java | 6 +++--- .../torrc/TorrcFileGenerator.java | 10 +++++----- ...DirectoryAuthorityTorrcGeneratorTests.java | 10 +++++----- .../RelayTorrcGeneratorTests.java | 10 +++++----- 12 files changed, 50 insertions(+), 50 deletions(-) rename network/tor-local-network/src/main/java/bisq/tor/local_network/da/{DirectoryAuthority.java => TorNode.java} (95%) diff --git a/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityKeyGenerationTests.java b/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityKeyGenerationTests.java index 6cda61b46f..42a0751e15 100644 --- a/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityKeyGenerationTests.java +++ b/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityKeyGenerationTests.java @@ -17,7 +17,7 @@ package bisq.tor.local_network; -import bisq.tor.local_network.da.DirectoryAuthority; +import bisq.tor.local_network.da.TorNode; import bisq.tor.local_network.da.keygen.process.DirectoryAuthorityKeyGenerator; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -35,7 +35,7 @@ public void generateKeys(@TempDir Path dataDir) throws IOException, InterruptedE assertThat(keysPath.toFile().mkdirs()) .isTrue(); - var directoryAuthority = DirectoryAuthority.builder() + var directoryAuthority = TorNode.builder() .nickname("Nick") .dataDir(dataDir) .controlPort(1) diff --git a/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityTests.java b/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityTests.java index a806ade0e7..c789bc1c32 100644 --- a/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityTests.java +++ b/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityTests.java @@ -18,8 +18,8 @@ package bisq.tor.local_network; import bisq.common.util.NetworkUtils; -import bisq.tor.local_network.da.DirectoryAuthority; import bisq.tor.local_network.da.DirectoryAuthorityFactory; +import bisq.tor.local_network.da.TorNode; import bisq.tor.local_network.torrc.DirectoryAuthorityTorrcGenerator; import bisq.tor.local_network.torrc.TorrcFileGenerator; import org.junit.jupiter.api.Test; @@ -36,7 +36,7 @@ public class DirectoryAuthorityTests { @Test public void createOneDA(@TempDir Path tempDir) throws IOException, InterruptedException { - var firstDirectoryAuthority = DirectoryAuthority.builder() + var firstDirectoryAuthority = TorNode.builder() .nickname("DA_1") .dataDir(tempDir) .controlPort(NetworkUtils.findFreeSystemPort()) @@ -54,7 +54,7 @@ public void createThreeDA(@TempDir Path tempDir) throws IOException, Interrupted var dirAuthFactory = new DirectoryAuthorityFactory(); Path firstDaDataDir = tempDir.resolve("da_1"); - var firstDirectoryAuthority = DirectoryAuthority.builder() + var firstDirectoryAuthority = TorNode.builder() .nickname("DA_1") .dataDir(firstDaDataDir) .controlPort(NetworkUtils.findFreeSystemPort()) @@ -64,7 +64,7 @@ public void createThreeDA(@TempDir Path tempDir) throws IOException, Interrupted dirAuthFactory.createDirectoryAuthority(firstDirectoryAuthority, PASSPHRASE); Path secondDaDataDir = tempDir.resolve("da_2"); - var secondDirectoryAuthority = DirectoryAuthority.builder() + var secondDirectoryAuthority = TorNode.builder() .nickname("DA_2") .dataDir(secondDaDataDir) .controlPort(NetworkUtils.findFreeSystemPort()) @@ -74,7 +74,7 @@ public void createThreeDA(@TempDir Path tempDir) throws IOException, Interrupted dirAuthFactory.createDirectoryAuthority(secondDirectoryAuthority, PASSPHRASE); Path thirdDaDataDir = tempDir.resolve("da_3"); - var thirdDirectoryAuthority = DirectoryAuthority.builder() + var thirdDirectoryAuthority = TorNode.builder() .nickname("DA_3") .dataDir(thirdDaDataDir) .controlPort(NetworkUtils.findFreeSystemPort()) @@ -83,8 +83,8 @@ public void createThreeDA(@TempDir Path tempDir) throws IOException, Interrupted .build(); dirAuthFactory.createDirectoryAuthority(thirdDirectoryAuthority, PASSPHRASE); - Set allDAs = dirAuthFactory.getAllDirectoryAuthorities(); - for (DirectoryAuthority da : allDAs) { + Set allDAs = dirAuthFactory.getAllDirectoryAuthorities(); + for (TorNode da : allDAs) { var torDaTorrcGenerator = new DirectoryAuthorityTorrcGenerator(da); var torrcFileGenerator = new TorrcFileGenerator(torDaTorrcGenerator, allDAs); torrcFileGenerator.generate(); diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/DirectoryAuthorityFactory.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/da/DirectoryAuthorityFactory.java index 5c1b7a1df7..2c9b18c4b4 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/DirectoryAuthorityFactory.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/da/DirectoryAuthorityFactory.java @@ -29,9 +29,9 @@ public class DirectoryAuthorityFactory { @Getter - private final Set allDirectoryAuthorities = new HashSet<>(); + private final Set allDirectoryAuthorities = new HashSet<>(); - public void createDirectoryAuthority(DirectoryAuthority directoryAuthority, + public void createDirectoryAuthority(TorNode directoryAuthority, String passphrase) throws IOException, InterruptedException { Path dataDir = directoryAuthority.getDataDir(); createDataDirIfNotPresent(dataDir); diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/DirectoryAuthority.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/da/TorNode.java similarity index 95% rename from network/tor-local-network/src/main/java/bisq/tor/local_network/da/DirectoryAuthority.java rename to network/tor-local-network/src/main/java/bisq/tor/local_network/da/TorNode.java index 01d5976fb4..e058c41710 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/DirectoryAuthority.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/da/TorNode.java @@ -29,7 +29,7 @@ import java.util.function.UnaryOperator; @Getter -public class DirectoryAuthority { +public class TorNode { private final String nickname; private final Path dataDir; @@ -48,7 +48,7 @@ public class DirectoryAuthority { private Optional relayKeyFingerprint = Optional.empty(); @Builder - public DirectoryAuthority(String nickname, Path dataDir, int controlPort, int orPort, int dirPort) { + public TorNode(String nickname, Path dataDir, int controlPort, int orPort, int dirPort) { this.nickname = nickname; this.dataDir = dataDir; this.controlPort = controlPort; diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/RelayKeyGenProcess.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/RelayKeyGenProcess.java index e1d21e2f18..3a6ae4f687 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/RelayKeyGenProcess.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/RelayKeyGenProcess.java @@ -17,15 +17,15 @@ package bisq.tor.local_network.da.keygen; -import bisq.tor.local_network.da.DirectoryAuthority; +import bisq.tor.local_network.da.TorNode; import java.io.IOException; import java.util.concurrent.TimeUnit; public class RelayKeyGenProcess { - private final DirectoryAuthority directoryAuthority; + private final TorNode directoryAuthority; - public RelayKeyGenProcess(DirectoryAuthority directoryAuthority) { + public RelayKeyGenProcess(TorNode directoryAuthority) { this.directoryAuthority = directoryAuthority; } diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/process/DirectoryAuthorityKeyGenerator.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/process/DirectoryAuthorityKeyGenerator.java index 140b3ca4b2..f7e14cf365 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/process/DirectoryAuthorityKeyGenerator.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/process/DirectoryAuthorityKeyGenerator.java @@ -17,13 +17,13 @@ package bisq.tor.local_network.da.keygen.process; -import bisq.tor.local_network.da.DirectoryAuthority; +import bisq.tor.local_network.da.TorNode; import bisq.tor.local_network.da.keygen.RelayKeyGenProcess; import java.io.IOException; public class DirectoryAuthorityKeyGenerator { - public static void generate(DirectoryAuthority directoryAuthority, String passphrase) throws IOException, InterruptedException { + public static void generate(TorNode directoryAuthority, String passphrase) throws IOException, InterruptedException { var identityKeyGenProcess = new DirectoryIdentityKeyGenProcess( directoryAuthority.getKeysPath(), "127.0.0.1:" + directoryAuthority.getDirPort() diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/CommonTorrcGenerator.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/CommonTorrcGenerator.java index 66ea325e8b..1b138fb919 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/CommonTorrcGenerator.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/CommonTorrcGenerator.java @@ -17,7 +17,7 @@ package bisq.tor.local_network.torrc; -import bisq.tor.local_network.da.DirectoryAuthority; +import bisq.tor.local_network.da.TorNode; import lombok.Getter; /** @@ -25,11 +25,11 @@ */ @Getter public abstract class CommonTorrcGenerator { - protected final DirectoryAuthority thisDirectoryAuthority; + protected final TorNode thisTorNode; protected final StringBuilder torrcStringBuilder = new StringBuilder(); - public CommonTorrcGenerator(DirectoryAuthority thisDirectoryAuthority) { - this.thisDirectoryAuthority = thisDirectoryAuthority; + public CommonTorrcGenerator(TorNode thisTorNode) { + this.thisTorNode = thisTorNode; } public void generate() { @@ -43,28 +43,28 @@ public void generate() { .append("TestingDirAuthVoteGuard *\n") .append("TestingMinExitFlagThreshold 0\n") - .append("DataDirectory ").append(thisDirectoryAuthority.getDataDir()).append("\n") + .append("DataDirectory ").append(thisTorNode.getDataDir()).append("\n") .append("RunAsDaemon 1\n") - .append("Nickname ").append(thisDirectoryAuthority.getNickname()).append("\n") + .append("Nickname ").append(thisTorNode.getNickname()).append("\n") .append("ShutdownWaitLength 2\n") .append("DisableDebuggerAttachment 0\n") - .append("ControlPort 127.0.0.1:").append(thisDirectoryAuthority.getControlPort()).append("\n") + .append("ControlPort 127.0.0.1:").append(thisTorNode.getControlPort()).append("\n") .append("CookieAuthentication 1\n") - .append("Log debug file ").append(thisDirectoryAuthority.getDataDir().resolve("debug.log").toAbsolutePath()).append("\n") + .append("Log debug file ").append(thisTorNode.getDataDir().resolve("debug.log").toAbsolutePath()).append("\n") .append("ProtocolWarnings 1\n") .append("SafeLogging 0\n") .append("LogTimeGranularity 1\n") .append("SocksPort 0\n") - .append("OrPort ").append(thisDirectoryAuthority.getOrPort()).append("\n") + .append("OrPort ").append(thisTorNode.getOrPort()).append("\n") .append("Address 127.0.0.1\n") .append("ServerDNSDetectHijacking 0\n") .append("ServerDNSTestAddresses\n") - .append("DirPort ").append(thisDirectoryAuthority.getDirPort()).append("\n"); + .append("DirPort ").append(thisTorNode.getDirPort()).append("\n"); } } diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/DirectoryAuthorityTorrcGenerator.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/DirectoryAuthorityTorrcGenerator.java index d5363d357b..28c686e2a3 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/DirectoryAuthorityTorrcGenerator.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/DirectoryAuthorityTorrcGenerator.java @@ -17,10 +17,10 @@ package bisq.tor.local_network.torrc; -import bisq.tor.local_network.da.DirectoryAuthority; +import bisq.tor.local_network.da.TorNode; public class DirectoryAuthorityTorrcGenerator extends CommonTorrcGenerator { - public DirectoryAuthorityTorrcGenerator(DirectoryAuthority thisDirectoryAuthority) { + public DirectoryAuthorityTorrcGenerator(TorNode thisDirectoryAuthority) { super(thisDirectoryAuthority); } @@ -31,7 +31,7 @@ public void generate() { torrcStringBuilder .append("AuthoritativeDirectory 1\n") .append("V3AuthoritativeDirectory 1\n") - .append("ContactInfo auth-").append(thisDirectoryAuthority.getNickname()).append("@test.test\n") + .append("ContactInfo auth-").append(thisTorNode.getNickname()).append("@test.test\n") .append("AssumeReachable 1\n") @@ -43,6 +43,6 @@ public void generate() { .append("V3AuthVoteDelay 4\n") .append("V3AuthDistDelay 4\n") - .append(thisDirectoryAuthority.getExitPolicy()).append("\n"); + .append(thisTorNode.getExitPolicy()).append("\n"); } } diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/RelayTorrcGenerator.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/RelayTorrcGenerator.java index c3067a8b8c..2b15d48786 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/RelayTorrcGenerator.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/RelayTorrcGenerator.java @@ -17,11 +17,11 @@ package bisq.tor.local_network.torrc; -import bisq.tor.local_network.da.DirectoryAuthority; +import bisq.tor.local_network.da.TorNode; public class RelayTorrcGenerator extends CommonTorrcGenerator { - public RelayTorrcGenerator(DirectoryAuthority thisDirectoryAuthority) { - super(thisDirectoryAuthority); + public RelayTorrcGenerator(TorNode thisTorNode) { + super(thisTorNode); } @Override diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/TorrcFileGenerator.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/TorrcFileGenerator.java index b2ff5bee61..5820863b2c 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/TorrcFileGenerator.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/TorrcFileGenerator.java @@ -17,7 +17,7 @@ package bisq.tor.local_network.torrc; -import bisq.tor.local_network.da.DirectoryAuthority; +import bisq.tor.local_network.da.TorNode; import java.io.IOException; import java.nio.file.Files; @@ -25,9 +25,9 @@ public class TorrcFileGenerator { private final CommonTorrcGenerator commonTorrcGenerator; - private final Set allDirAuthorities; + private final Set allDirAuthorities; - public TorrcFileGenerator(CommonTorrcGenerator commonTorrcGenerator, Set allDirAuthorities) { + public TorrcFileGenerator(CommonTorrcGenerator commonTorrcGenerator, Set allDirAuthorities) { this.commonTorrcGenerator = commonTorrcGenerator; this.allDirAuthorities = allDirAuthorities; } @@ -44,7 +44,7 @@ public void generate() throws IOException { .append(" ").append(dirAuthority.getRelayKeyFingerprint().orElseThrow()) .append("\n")); - DirectoryAuthority thisDirectoryAuthority = commonTorrcGenerator.getThisDirectoryAuthority(); - Files.writeString(thisDirectoryAuthority.getTorrcPath(), torrcStringBuilder.toString()); + TorNode thisTorNode = commonTorrcGenerator.getThisTorNode(); + Files.writeString(thisTorNode.getTorrcPath(), torrcStringBuilder.toString()); } } diff --git a/network/tor-local-network/src/test/java/bisq/tor/local_network/DirectoryAuthorityTorrcGeneratorTests.java b/network/tor-local-network/src/test/java/bisq/tor/local_network/DirectoryAuthorityTorrcGeneratorTests.java index 9d2d0e7fd7..570c9508c3 100644 --- a/network/tor-local-network/src/test/java/bisq/tor/local_network/DirectoryAuthorityTorrcGeneratorTests.java +++ b/network/tor-local-network/src/test/java/bisq/tor/local_network/DirectoryAuthorityTorrcGeneratorTests.java @@ -17,7 +17,7 @@ package bisq.tor.local_network; -import bisq.tor.local_network.da.DirectoryAuthority; +import bisq.tor.local_network.da.TorNode; import bisq.tor.local_network.torrc.DirectoryAuthorityTorrcGenerator; import bisq.tor.local_network.torrc.TorrcFileGenerator; import org.junit.jupiter.api.Test; @@ -38,8 +38,8 @@ void basicTest(@TempDir Path tempDir) throws IOException { Path daAPath = tempDir.resolve("DA_A"); assertThat(daAPath.toFile().mkdir()).isTrue(); - DirectoryAuthority firstDirAuth = spy( - DirectoryAuthority.builder() + TorNode firstDirAuth = spy( + TorNode.builder() .nickname("A") .dataDir(daAPath) @@ -58,8 +58,8 @@ void basicTest(@TempDir Path tempDir) throws IOException { .when(firstDirAuth) .getRelayKeyFingerprint(); - DirectoryAuthority secondDirAuth = spy( - DirectoryAuthority.builder() + TorNode secondDirAuth = spy( + TorNode.builder() .nickname("B") .dataDir(tempDir.resolve("DA_B")) diff --git a/network/tor-local-network/src/test/java/bisq/tor/local_network/RelayTorrcGeneratorTests.java b/network/tor-local-network/src/test/java/bisq/tor/local_network/RelayTorrcGeneratorTests.java index 013c692439..fb0188d751 100644 --- a/network/tor-local-network/src/test/java/bisq/tor/local_network/RelayTorrcGeneratorTests.java +++ b/network/tor-local-network/src/test/java/bisq/tor/local_network/RelayTorrcGeneratorTests.java @@ -17,7 +17,7 @@ package bisq.tor.local_network; -import bisq.tor.local_network.da.DirectoryAuthority; +import bisq.tor.local_network.da.TorNode; import bisq.tor.local_network.torrc.RelayTorrcGenerator; import bisq.tor.local_network.torrc.TorrcFileGenerator; import org.junit.jupiter.api.Test; @@ -38,8 +38,8 @@ void basicTest(@TempDir Path tempDir) throws IOException { Path daAPath = tempDir.resolve("DA_A"); assertThat(daAPath.toFile().mkdir()).isTrue(); - DirectoryAuthority firstDirAuth = spy( - DirectoryAuthority.builder() + TorNode firstDirAuth = spy( + TorNode.builder() .nickname("A") .dataDir(daAPath) @@ -58,8 +58,8 @@ void basicTest(@TempDir Path tempDir) throws IOException { .when(firstDirAuth) .getRelayKeyFingerprint(); - DirectoryAuthority secondDirAuth = spy( - DirectoryAuthority.builder() + TorNode secondDirAuth = spy( + TorNode.builder() .nickname("B") .dataDir(tempDir.resolve("DA_B")) From 95a32155c3590e1055bc51a98776c9ade26a7bec Mon Sep 17 00:00:00 2001 From: Alva Swanson Date: Sun, 2 Jul 2023 16:19:42 +0200 Subject: [PATCH 2/2] Move TorNode to root package --- .../local_network/DirectoryAuthorityKeyGenerationTests.java | 1 - .../java/bisq/tor/local_network/DirectoryAuthorityTests.java | 1 - .../src/main/java/bisq/tor/local_network/{da => }/TorNode.java | 3 +-- .../bisq/tor/local_network/da/DirectoryAuthorityFactory.java | 1 + .../bisq/tor/local_network/da/keygen/RelayKeyGenProcess.java | 2 +- .../da/keygen/process/DirectoryAuthorityKeyGenerator.java | 2 +- .../bisq/tor/local_network/torrc/CommonTorrcGenerator.java | 2 +- .../local_network/torrc/DirectoryAuthorityTorrcGenerator.java | 2 +- .../java/bisq/tor/local_network/torrc/RelayTorrcGenerator.java | 2 +- .../java/bisq/tor/local_network/torrc/TorrcFileGenerator.java | 2 +- .../local_network/DirectoryAuthorityTorrcGeneratorTests.java | 1 - .../java/bisq/tor/local_network/RelayTorrcGeneratorTests.java | 1 - 12 files changed, 8 insertions(+), 12 deletions(-) rename network/tor-local-network/src/main/java/bisq/tor/local_network/{da => }/TorNode.java (97%) diff --git a/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityKeyGenerationTests.java b/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityKeyGenerationTests.java index 42a0751e15..047a5fb16a 100644 --- a/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityKeyGenerationTests.java +++ b/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityKeyGenerationTests.java @@ -17,7 +17,6 @@ package bisq.tor.local_network; -import bisq.tor.local_network.da.TorNode; import bisq.tor.local_network.da.keygen.process.DirectoryAuthorityKeyGenerator; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; diff --git a/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityTests.java b/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityTests.java index c789bc1c32..06f420d9a2 100644 --- a/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityTests.java +++ b/network/tor-local-network/src/integrationTest/java/bisq/tor/local_network/DirectoryAuthorityTests.java @@ -19,7 +19,6 @@ import bisq.common.util.NetworkUtils; import bisq.tor.local_network.da.DirectoryAuthorityFactory; -import bisq.tor.local_network.da.TorNode; import bisq.tor.local_network.torrc.DirectoryAuthorityTorrcGenerator; import bisq.tor.local_network.torrc.TorrcFileGenerator; import org.junit.jupiter.api.Test; diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/TorNode.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/TorNode.java similarity index 97% rename from network/tor-local-network/src/main/java/bisq/tor/local_network/da/TorNode.java rename to network/tor-local-network/src/main/java/bisq/tor/local_network/TorNode.java index e058c41710..fe90657a42 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/TorNode.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/TorNode.java @@ -15,9 +15,8 @@ * along with Bisq. If not, see . */ -package bisq.tor.local_network.da; +package bisq.tor.local_network; -import bisq.tor.local_network.KeyFingerprintReader; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/DirectoryAuthorityFactory.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/da/DirectoryAuthorityFactory.java index 2c9b18c4b4..d1ac3ada98 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/DirectoryAuthorityFactory.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/da/DirectoryAuthorityFactory.java @@ -17,6 +17,7 @@ package bisq.tor.local_network.da; +import bisq.tor.local_network.TorNode; import bisq.tor.local_network.da.keygen.process.DirectoryAuthorityKeyGenerator; import lombok.Getter; diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/RelayKeyGenProcess.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/RelayKeyGenProcess.java index 3a6ae4f687..c23c134700 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/RelayKeyGenProcess.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/RelayKeyGenProcess.java @@ -17,7 +17,7 @@ package bisq.tor.local_network.da.keygen; -import bisq.tor.local_network.da.TorNode; +import bisq.tor.local_network.TorNode; import java.io.IOException; import java.util.concurrent.TimeUnit; diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/process/DirectoryAuthorityKeyGenerator.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/process/DirectoryAuthorityKeyGenerator.java index f7e14cf365..51ea36d136 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/process/DirectoryAuthorityKeyGenerator.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/da/keygen/process/DirectoryAuthorityKeyGenerator.java @@ -17,7 +17,7 @@ package bisq.tor.local_network.da.keygen.process; -import bisq.tor.local_network.da.TorNode; +import bisq.tor.local_network.TorNode; import bisq.tor.local_network.da.keygen.RelayKeyGenProcess; import java.io.IOException; diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/CommonTorrcGenerator.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/CommonTorrcGenerator.java index 1b138fb919..eafa49e864 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/CommonTorrcGenerator.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/CommonTorrcGenerator.java @@ -17,7 +17,7 @@ package bisq.tor.local_network.torrc; -import bisq.tor.local_network.da.TorNode; +import bisq.tor.local_network.TorNode; import lombok.Getter; /** diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/DirectoryAuthorityTorrcGenerator.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/DirectoryAuthorityTorrcGenerator.java index 28c686e2a3..7250b04b1a 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/DirectoryAuthorityTorrcGenerator.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/DirectoryAuthorityTorrcGenerator.java @@ -17,7 +17,7 @@ package bisq.tor.local_network.torrc; -import bisq.tor.local_network.da.TorNode; +import bisq.tor.local_network.TorNode; public class DirectoryAuthorityTorrcGenerator extends CommonTorrcGenerator { public DirectoryAuthorityTorrcGenerator(TorNode thisDirectoryAuthority) { diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/RelayTorrcGenerator.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/RelayTorrcGenerator.java index 2b15d48786..60fee95609 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/RelayTorrcGenerator.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/RelayTorrcGenerator.java @@ -17,7 +17,7 @@ package bisq.tor.local_network.torrc; -import bisq.tor.local_network.da.TorNode; +import bisq.tor.local_network.TorNode; public class RelayTorrcGenerator extends CommonTorrcGenerator { public RelayTorrcGenerator(TorNode thisTorNode) { diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/TorrcFileGenerator.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/TorrcFileGenerator.java index 5820863b2c..7158a937ca 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/TorrcFileGenerator.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/torrc/TorrcFileGenerator.java @@ -17,7 +17,7 @@ package bisq.tor.local_network.torrc; -import bisq.tor.local_network.da.TorNode; +import bisq.tor.local_network.TorNode; import java.io.IOException; import java.nio.file.Files; diff --git a/network/tor-local-network/src/test/java/bisq/tor/local_network/DirectoryAuthorityTorrcGeneratorTests.java b/network/tor-local-network/src/test/java/bisq/tor/local_network/DirectoryAuthorityTorrcGeneratorTests.java index 570c9508c3..c9bd9072a9 100644 --- a/network/tor-local-network/src/test/java/bisq/tor/local_network/DirectoryAuthorityTorrcGeneratorTests.java +++ b/network/tor-local-network/src/test/java/bisq/tor/local_network/DirectoryAuthorityTorrcGeneratorTests.java @@ -17,7 +17,6 @@ package bisq.tor.local_network; -import bisq.tor.local_network.da.TorNode; import bisq.tor.local_network.torrc.DirectoryAuthorityTorrcGenerator; import bisq.tor.local_network.torrc.TorrcFileGenerator; import org.junit.jupiter.api.Test; diff --git a/network/tor-local-network/src/test/java/bisq/tor/local_network/RelayTorrcGeneratorTests.java b/network/tor-local-network/src/test/java/bisq/tor/local_network/RelayTorrcGeneratorTests.java index fb0188d751..1205113e7f 100644 --- a/network/tor-local-network/src/test/java/bisq/tor/local_network/RelayTorrcGeneratorTests.java +++ b/network/tor-local-network/src/test/java/bisq/tor/local_network/RelayTorrcGeneratorTests.java @@ -17,7 +17,6 @@ package bisq.tor.local_network; -import bisq.tor.local_network.da.TorNode; import bisq.tor.local_network.torrc.RelayTorrcGenerator; import bisq.tor.local_network.torrc.TorrcFileGenerator; import org.junit.jupiter.api.Test;