From 44c0ddbd4650710b9aebf04d17b5808194809a8b Mon Sep 17 00:00:00 2001 From: Alva Swanson Date: Fri, 7 Jul 2023 15:05:02 +0200 Subject: [PATCH] Rename getIdentityKeyFingerprint() to getAuthorityIdentityKeyFingerprint() --- .../src/main/java/bisq/tor/local_network/TorNode.java | 2 +- .../da/keygen/process/DirectoryAuthorityKeyGenerator.java | 2 +- .../java/bisq/tor/local_network/torrc/TorrcFileGenerator.java | 2 +- .../local_network/DirectoryAuthorityTorrcGeneratorTests.java | 4 ++-- .../java/bisq/tor/local_network/RelayTorrcGeneratorTests.java | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/network/tor-local-network/src/main/java/bisq/tor/local_network/TorNode.java b/network/tor-local-network/src/main/java/bisq/tor/local_network/TorNode.java index ab434bd262..28834baeeb 100644 --- a/network/tor-local-network/src/main/java/bisq/tor/local_network/TorNode.java +++ b/network/tor-local-network/src/main/java/bisq/tor/local_network/TorNode.java @@ -68,7 +68,7 @@ public Path getTorrcPath() { return dataDir.resolve("torrc"); } - public Optional getIdentityKeyFingerprint() { + public Optional getAuthorityIdentityKeyFingerprint() { if (type != Type.DIRECTORY_AUTHORITY) { return Optional.empty(); } 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 51ea36d136..455e7af36e 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 @@ -29,7 +29,7 @@ public static void generate(TorNode directoryAuthority, String passphrase) throw "127.0.0.1:" + directoryAuthority.getDirPort() ); identityKeyGenProcess.generateKeys(passphrase); - String identityKeyFingerprint = directoryAuthority.getIdentityKeyFingerprint().orElseThrow(); + String identityKeyFingerprint = directoryAuthority.getAuthorityIdentityKeyFingerprint().orElseThrow(); var relayKeyGenProcess = new RelayKeyGenProcess(directoryAuthority); relayKeyGenProcess.generateKeys(identityKeyFingerprint); 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 7158a937ca..90d53f5805 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 @@ -39,7 +39,7 @@ public void generate() throws IOException { allDirAuthorities.forEach(dirAuthority -> torrcStringBuilder.append("DirAuthority ").append(dirAuthority.getNickname()) .append(" orport=").append(dirAuthority.getOrPort()) - .append(" v3ident=").append(dirAuthority.getIdentityKeyFingerprint().orElseThrow()) + .append(" v3ident=").append(dirAuthority.getAuthorityIdentityKeyFingerprint().orElseThrow()) .append(" 127.0.0.1:").append(dirAuthority.getDirPort()) .append(" ").append(dirAuthority.getRelayKeyFingerprint().orElseThrow()) .append("\n")); 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 41df8f9010..2657fea1d0 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 @@ -52,7 +52,7 @@ void basicTest(@TempDir Path tempDir) throws IOException { doReturn(Optional.of("AAAA_fp")) .when(firstDirAuth) - .getIdentityKeyFingerprint(); + .getAuthorityIdentityKeyFingerprint(); doReturn(Optional.of("AAAA_v3")) .when(firstDirAuth) @@ -73,7 +73,7 @@ void basicTest(@TempDir Path tempDir) throws IOException { doReturn(Optional.of("BBBB_fp")) .when(secondDirAuth) - .getIdentityKeyFingerprint(); + .getAuthorityIdentityKeyFingerprint(); doReturn(Optional.of("BBBB_v3")) .when(secondDirAuth) 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 79c46d5420..f056e04310 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 @@ -52,7 +52,7 @@ void basicTest(@TempDir Path tempDir) throws IOException { doReturn(Optional.of("AAAA_fp")) .when(firstDirAuth) - .getIdentityKeyFingerprint(); + .getAuthorityIdentityKeyFingerprint(); doReturn(Optional.of("AAAA_v3")) .when(firstDirAuth) @@ -73,7 +73,7 @@ void basicTest(@TempDir Path tempDir) throws IOException { doReturn(Optional.of("BBBB_fp")) .when(secondDirAuth) - .getIdentityKeyFingerprint(); + .getAuthorityIdentityKeyFingerprint(); doReturn(Optional.of("BBBB_v3")) .when(secondDirAuth)