From 52b1fdfee9f8223f57c101fdbe739e0dc648791e Mon Sep 17 00:00:00 2001 From: Stefan Bratanov Date: Mon, 23 Oct 2023 17:33:39 +0100 Subject: [PATCH] rename createInstance to getInstance --- .../tech/pegasys/teku/reference/phase0/kzg/KzgTestExecutor.java | 2 +- .../spec/logic/versions/deneb/helpers/MiscHelpersDeneb.java | 2 +- .../teku/spec/logic/versions/deneb/helpers/KzgResolver.java | 2 +- .../src/main/java/tech/pegasys/teku/kzg/ckzg4844/CKZG4844.java | 2 +- .../test/java/tech/pegasys/teku/kzg/ckzg4844/CKZG4844Test.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eth-reference-tests/src/referenceTest/java/tech/pegasys/teku/reference/phase0/kzg/KzgTestExecutor.java b/eth-reference-tests/src/referenceTest/java/tech/pegasys/teku/reference/phase0/kzg/KzgTestExecutor.java index 5c12bcb6291..33c6c9f1679 100644 --- a/eth-reference-tests/src/referenceTest/java/tech/pegasys/teku/reference/phase0/kzg/KzgTestExecutor.java +++ b/eth-reference-tests/src/referenceTest/java/tech/pegasys/teku/reference/phase0/kzg/KzgTestExecutor.java @@ -30,7 +30,7 @@ public abstract class KzgTestExecutor implements TestExecutor { private static final Pattern TEST_NAME_PATTERN = Pattern.compile("kzg-(.+)/.+"); - protected final KZG kzg = CKZG4844.createInstance(); + protected final KZG kzg = CKZG4844.getInstance(); @Override public final void runTest(final TestDefinition testDefinition) throws Throwable { diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/deneb/helpers/MiscHelpersDeneb.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/deneb/helpers/MiscHelpersDeneb.java index 7af5a85cd83..1ab0ffb4bd7 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/deneb/helpers/MiscHelpersDeneb.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/deneb/helpers/MiscHelpersDeneb.java @@ -51,7 +51,7 @@ public MiscHelpersDeneb(final SpecConfigDeneb specConfig) { private static KZG initKZG(final SpecConfigDeneb config) { final KZG kzg; if (!config.getDenebForkEpoch().equals(SpecConfig.FAR_FUTURE_EPOCH) && !config.isKZGNoop()) { - kzg = CKZG4844.createInstance(); + kzg = CKZG4844.getInstance(); kzg.loadTrustedSetup(config.getTrustedSetupPath().orElseThrow()); } else { kzg = KZG.NOOP; diff --git a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/logic/versions/deneb/helpers/KzgResolver.java b/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/logic/versions/deneb/helpers/KzgResolver.java index dcc744ba185..1ebef68b1e5 100644 --- a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/logic/versions/deneb/helpers/KzgResolver.java +++ b/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/logic/versions/deneb/helpers/KzgResolver.java @@ -55,7 +55,7 @@ private static class KzgAutoLoadFree implements Store.CloseOnReset { private static final String TRUSTED_SETUP = Resources.getResource(TrustedSetups.class, "trusted_setup.txt").toExternalForm(); - private final KZG kzg = CKZG4844.createInstance(); + private final KZG kzg = CKZG4844.getInstance(); private KzgAutoLoadFree() { kzg.loadTrustedSetup(TRUSTED_SETUP); diff --git a/infrastructure/kzg/src/main/java/tech/pegasys/teku/kzg/ckzg4844/CKZG4844.java b/infrastructure/kzg/src/main/java/tech/pegasys/teku/kzg/ckzg4844/CKZG4844.java index 51d430e03c4..3c081afb77a 100644 --- a/infrastructure/kzg/src/main/java/tech/pegasys/teku/kzg/ckzg4844/CKZG4844.java +++ b/infrastructure/kzg/src/main/java/tech/pegasys/teku/kzg/ckzg4844/CKZG4844.java @@ -38,7 +38,7 @@ public final class CKZG4844 implements KZG { private Optional loadedTrustedSetupFile = Optional.empty(); - public static synchronized CKZG4844 createInstance() { + public static synchronized CKZG4844 getInstance() { if (instance == null) { instance = new CKZG4844(); } diff --git a/infrastructure/kzg/src/test/java/tech/pegasys/teku/kzg/ckzg4844/CKZG4844Test.java b/infrastructure/kzg/src/test/java/tech/pegasys/teku/kzg/ckzg4844/CKZG4844Test.java index 6a9bda108f7..82d5933eb9c 100644 --- a/infrastructure/kzg/src/test/java/tech/pegasys/teku/kzg/ckzg4844/CKZG4844Test.java +++ b/infrastructure/kzg/src/test/java/tech/pegasys/teku/kzg/ckzg4844/CKZG4844Test.java @@ -51,7 +51,7 @@ public final class CKZG4844Test { private static final Random RND = new Random(RANDOM_SEED); private static final String TRUSTED_SETUP_PATH = "trusted_setup.txt"; - private static final CKZG4844 KZG = CKZG4844.createInstance(); + private static final CKZG4844 KZG = CKZG4844.getInstance(); @BeforeEach public void setUp() {