mirror of
https://github.com/vacp2p/linea-besu.git
synced 2026-01-09 21:17:54 -05:00
[PRIV-41] Refactor PrivacyParameters config to use builder pattern (#1226)
* [PRIV-41] Use metrics system for private state db - Use PrivacyParametersBuilder to build PrivacyParameters - refactor PrivacyParameters to expose default options - refactor test builders to use PrivacyParameters.DEFAULT - Use URI in Enclave * Fix: enclave tests from bad merge * Fix privacy acceptance tests after db configuration changes * Switch to use nested class for PrivacyParametersBuilder Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
This commit is contained in:
committed by
Danno Ferrin
parent
0eb5d9676e
commit
0ce2d49aa5
@@ -15,6 +15,7 @@ package tech.pegasys.orion.testutil;
|
||||
import static com.google.common.io.Files.readLines;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -51,12 +52,6 @@ public class OrionTestHarness {
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public List<String> getPrivateKeys() {
|
||||
return config.privateKeys().stream()
|
||||
.map(OrionTestHarness::readFile)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private static String readFile(final Path path) {
|
||||
try {
|
||||
return readLines(path.toFile(), Charsets.UTF_8).get(0);
|
||||
@@ -66,13 +61,11 @@ public class OrionTestHarness {
|
||||
}
|
||||
}
|
||||
|
||||
public String clientUrl() {
|
||||
return new HttpUrl.Builder()
|
||||
.scheme("http")
|
||||
.host(HOST)
|
||||
.port(orion.clientPort())
|
||||
.build()
|
||||
.toString();
|
||||
public URI clientUrl() {
|
||||
HttpUrl httpUrl =
|
||||
new HttpUrl.Builder().scheme("http").host(HOST).port(orion.clientPort()).build();
|
||||
|
||||
return URI.create(httpUrl.toString());
|
||||
}
|
||||
|
||||
public String nodeUrl() {
|
||||
|
||||
Reference in New Issue
Block a user