From f7550190f0f289c1ca58646f7d723e58df517c06 Mon Sep 17 00:00:00 2001 From: Stefan Bratanov Date: Tue, 31 Oct 2023 09:29:34 +0000 Subject: [PATCH] add constants --- .../pegasys/teku/networks/Eth2NetworkConfiguration.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ethereum/networks/src/main/java/tech/pegasys/teku/networks/Eth2NetworkConfiguration.java b/ethereum/networks/src/main/java/tech/pegasys/teku/networks/Eth2NetworkConfiguration.java index 6d2af493347..5f354be1e1c 100644 --- a/ethereum/networks/src/main/java/tech/pegasys/teku/networks/Eth2NetworkConfiguration.java +++ b/ethereum/networks/src/main/java/tech/pegasys/teku/networks/Eth2NetworkConfiguration.java @@ -66,6 +66,9 @@ public class Eth2NetworkConfiguration { // 26 thousand years should be enough public static final Integer MAX_EPOCHS_STORE_BLOBS = Integer.MAX_VALUE; + private static final String MAINNET_TRUSTED_SETUP_FILENAME = "mainnet-trusted-setup.txt"; + private static final String MINIMAL_TRUSTED_SETUP_FILENAME = "minimal-trusted-setup.txt"; + private final Spec spec; private final String constants; private final Optional initialState; @@ -622,7 +625,7 @@ public Builder applyTestnetDefaults() { public Builder applyMinimalNetworkDefaults() { return applyTestnetDefaults() - .trustedSetupFromClasspath("minimal-trusted-setup.txt") + .trustedSetupFromClasspath(MINIMAL_TRUSTED_SETUP_FILENAME) .constants(MINIMAL.configName()) .startupTargetPeerCount(0); } @@ -640,7 +643,7 @@ public Builder applyMainnetNetworkDefaults() { .constants(MAINNET.configName()) .initialStateFromClasspath("mainnet-genesis.ssz") .genesisStateFromClasspath("mainnet-genesis.ssz") - .trustedSetupFromClasspath("mainnet-trusted-setup.txt") + .trustedSetupFromClasspath(MAINNET_TRUSTED_SETUP_FILENAME) .startupTimeoutSeconds(120) .eth1DepositContractDeployBlock(11052984) .discoveryBootnodes(