Skip to content

Commit

Permalink
added ssz_static reftest references (#8244)
Browse files Browse the repository at this point in the history
1.5.0-alpha.0

Signed-off-by: Paul Harris <[email protected]>
  • Loading branch information
rolfyone authored Apr 24, 2024
1 parent c840610 commit cdcb177
Showing 1 changed file with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import tech.pegasys.teku.spec.schemas.SchemaDefinitionsBellatrix;
import tech.pegasys.teku.spec.schemas.SchemaDefinitionsCapella;
import tech.pegasys.teku.spec.schemas.SchemaDefinitionsDeneb;
import tech.pegasys.teku.spec.schemas.SchemaDefinitionsElectra;

public class SszTestExecutor<T extends SszData> implements TestExecutor {
private final SchemaProvider<T> sszType;
Expand Down Expand Up @@ -184,6 +185,43 @@ public class SszTestExecutor<T extends SszData> implements TestExecutor {
"ssz_static/BlobIdentifier",
new SszTestExecutor<>(schemas -> BlobIdentifier.SSZ_SCHEMA))

// electra types
.put(
"ssz_static/Consolidation",
new SszTestExecutor<>(
schemas -> SchemaDefinitionsElectra.required(schemas).getConsolidationSchema()))
.put(
"ssz_static/DepositReceipt",
new SszTestExecutor<>(
schemas -> SchemaDefinitionsElectra.required(schemas).getDepositReceiptSchema()))
.put(
"ssz_static/ExecutionLayerWithdrawalRequest",
new SszTestExecutor<>(
schemas ->
SchemaDefinitionsElectra.required(schemas)
.getExecutionLayerWithdrawalRequestSchema()))
.put(
"ssz_static/PendingBalanceDeposit",
new SszTestExecutor<>(
schemas ->
SchemaDefinitionsElectra.required(schemas).getPendingBalanceDepositSchema()))
.put(
"ssz_static/PendingConsolidation",
new SszTestExecutor<>(
schemas ->
SchemaDefinitionsElectra.required(schemas).getPendingConsolidationSchema()))
.put(
"ssz_static/PendingPartialWithdrawal",
new SszTestExecutor<>(
schemas ->
SchemaDefinitionsElectra.required(schemas)
.getPendingPartialWithdrawalSchema()))
.put(
"ssz_static/SignedConsolidation",
new SszTestExecutor<>(
schemas ->
SchemaDefinitionsElectra.required(schemas).getSignedConsolidationSchema()))

// Legacy Schemas (Not yet migrated to SchemaDefinitions)
.put(
"ssz_static/AttestationData", new SszTestExecutor<>(__ -> AttestationData.SSZ_SCHEMA))
Expand Down

0 comments on commit cdcb177

Please sign in to comment.