From cc341e0ab79a657e5c548662972e330a81132b82 Mon Sep 17 00:00:00 2001 From: tersec Date: Thu, 11 May 2023 14:39:36 +0000 Subject: [PATCH] remove unused definitions (#4937) --- beacon_chain/spec/datatypes/bellatrix.nim | 4 ---- beacon_chain/spec/datatypes/capella.nim | 4 ---- beacon_chain/spec/datatypes/deneb.nim | 4 ---- beacon_chain/spec/presets.nim | 14 -------------- 4 files changed, 26 deletions(-) diff --git a/beacon_chain/spec/datatypes/bellatrix.nim b/beacon_chain/spec/datatypes/bellatrix.nim index e38ee2090..e3249da2f 100644 --- a/beacon_chain/spec/datatypes/bellatrix.nim +++ b/beacon_chain/spec/datatypes/bellatrix.nim @@ -358,10 +358,6 @@ type SigVerifiedBeaconBlockBody | TrustedBeaconBlockBody - BlockParams = object - parentHash*: string - timestamp*: string - # TODO: There should be only a single generic HashedBeaconState definition func initHashedBeaconState*(s: BeaconState): HashedBeaconState = HashedBeaconState(data: s) diff --git a/beacon_chain/spec/datatypes/capella.nim b/beacon_chain/spec/datatypes/capella.nim index 737f9dbbc..1c24fa0f7 100644 --- a/beacon_chain/spec/datatypes/capella.nim +++ b/beacon_chain/spec/datatypes/capella.nim @@ -493,10 +493,6 @@ type SigVerifiedBeaconBlockBody | TrustedBeaconBlockBody - BlockParams = object - parentHash*: string - timestamp*: string - BeaconBlockValidatorChanges* = object # Collection of exits that are suitable for block production proposer_slashings*: List[ProposerSlashing, Limit MAX_PROPOSER_SLASHINGS] diff --git a/beacon_chain/spec/datatypes/deneb.nim b/beacon_chain/spec/datatypes/deneb.nim index 217e019c8..910d52bbc 100644 --- a/beacon_chain/spec/datatypes/deneb.nim +++ b/beacon_chain/spec/datatypes/deneb.nim @@ -509,10 +509,6 @@ type SigVerifiedBeaconBlockBody | TrustedBeaconBlockBody - BlockParams = object - parentHash*: string - timestamp*: string - # TODO: There should be only a single generic HashedBeaconState definition func initHashedBeaconState*(s: BeaconState): HashedBeaconState = HashedBeaconState(data: s) diff --git a/beacon_chain/spec/presets.nim b/beacon_chain/spec/presets.nim index e4e431ad6..351211a53 100644 --- a/beacon_chain/spec/presets.nim +++ b/beacon_chain/spec/presets.nim @@ -588,20 +588,6 @@ proc readRuntimeConfig*( # Isn't being used as a preset in the usual way: at any time, there's one correct value checkCompatibility PROPOSER_SCORE_BOOST - # BEGIN TODO - # It should be possible to remove these once we migrate to the next - # release of the consensus test suite: - template readAliasedField(currentName: untyped, oldName: static string) = - if oldName in values: - cfg.currentName = try: - parse(typeof(cfg.currentName), values[oldName]) - except ValueError as err: - raise (ref PresetFileError)(msg: "Unable to parse " & oldName) - - readAliasedField DENEB_FORK_EPOCH, "EIP4844_FORK_EPOCH" - readAliasedField DENEB_FORK_VERSION, "EIP4844_FORK_VERSION" - # END TODO - for name, field in cfg.fieldPairs(): if name in values: try: