Skip to content

Commit

Permalink
rename createInstance to getInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Oct 23, 2023
1 parent 5784129 commit 52b1fdf
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public final class CKZG4844 implements KZG {

private Optional<String> loadedTrustedSetupFile = Optional.empty();

public static synchronized CKZG4844 createInstance() {
public static synchronized CKZG4844 getInstance() {
if (instance == null) {
instance = new CKZG4844();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 52b1fdf

Please sign in to comment.