Skip to content

Commit

Permalink
final build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zilm13 committed Oct 17, 2024
1 parent 64e2abe commit eebec12
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public BlockFactoryEip7594(

@Override
public List<DataColumnSidecar> createDataColumnSidecars(
final SignedBlockContainer blockContainer, List<Blob> blobs) {
final SignedBlockContainer blockContainer, final List<Blob> blobs) {
final MiscHelpersEip7594 miscHelpersEip7594 =
MiscHelpersEip7594.required(spec.atSlot(blockContainer.getSlot()).miscHelpers());
return miscHelpersEip7594.constructDataColumnSidecars(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public List<BlobSidecar> createBlobSidecars(

@Override
public List<DataColumnSidecar> createDataColumnSidecars(
final SignedBlockContainer blockContainer, List<Blob> blobs) {
final SignedBlockContainer blockContainer, final List<Blob> blobs) {
return Collections.emptyList();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public List<BlobSidecar> createBlobSidecars(

@Override
public List<DataColumnSidecar> createDataColumnSidecars(
final SignedBlockContainer blockContainer, List<Blob> blobs) {
final SignedBlockContainer blockContainer, final List<Blob> blobs) {
return Collections.emptyList();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public List<BlobSidecar> createBlobSidecars(

@Override
public List<DataColumnSidecar> createDataColumnSidecars(
final SignedBlockContainer blockContainer, List<Blob> blobs) {
final SignedBlockContainer blockContainer, final List<Blob> blobs) {
return getFactoryForSlot(blockContainer.getSlot())
.createDataColumnSidecars(blockContainer, blobs);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ SafeFuture<BlockImportAndBroadcastValidationResults> importBlockAndBlobSidecars(
void publishBlockAndBlobSidecars(
final SignedBeaconBlock block,
final List<BlobSidecar> blobSidecars,
BlockPublishingPerformance blockPublishingPerformance) {
final BlockPublishingPerformance blockPublishingPerformance) {
blockGossipChannel.publishBlock(block);
List<Blob> blobs = blobSidecars.stream().map(BlobSidecar::getBlob).toList();
final List<DataColumnSidecar> dataColumnSidecars =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import tech.pegasys.teku.spec.datastructures.state.AnchorPoint;
import tech.pegasys.teku.spec.datastructures.state.Checkpoint;
import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState;
import tech.pegasys.teku.spec.datastructures.state.beaconstate.versions.electra.MutableBeaconStateElectra;
import tech.pegasys.teku.spec.datastructures.util.DepositUtil;
import tech.pegasys.teku.spec.datastructures.util.MerkleTree;
import tech.pegasys.teku.spec.networks.Eth2Network;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,11 @@ public void shouldReturnNetworkIdentityAltair() throws Exception {

when(eth2P2PNetwork.getMetadata()).thenReturn(metadataMessage);

final Response response = get();
final Response response = getResponse(GetIdentity.ROUTE);
assertThat(response.code()).isEqualTo(SC_OK);
final IdentityResponse identityResponse =
jsonProvider.jsonToObject(response.body().string(), IdentityResponse.class);
assertThat(identityResponse.data)
.isEqualTo(
new Identity(
node1.toBase58(),
enr,
List.of(address),
List.of(discoveryAddress),
new Metadata(metadataMessage)));
checkResponseData(
response,
"{\"seq_number\":\"4666673844721362956\",\"attnets\":\"0x0288000000000000\",\"syncnets\":\"0x0f\"}");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import tech.pegasys.teku.spec.SpecMilestone;
import tech.pegasys.teku.spec.datastructures.blobs.versions.eip7594.DataColumnSidecar;
import tech.pegasys.teku.spec.schemas.SchemaDefinitionCache;
import tech.pegasys.teku.spec.schemas.SchemaDefinitionsElectra;
import tech.pegasys.teku.spec.schemas.SchemaDefinitionsEip7594;

public class GetDataColumnSidecars extends RestApiEndpoint {
public static final String ROUTE = "/eth/v1/beacon/data_column_sidecars/{block_id}";
Expand Down Expand Up @@ -74,7 +74,7 @@ private static EndpointMetadata createEndpointMetadata(final SchemaDefinitionCac
}

@Override
public void handleRequest(RestApiRequest request) throws JsonProcessingException {
public void handleRequest(final RestApiRequest request) throws JsonProcessingException {
final List<UInt64> indices = request.getQueryParameterList(DATA_COLUMN_INDICES_PARAMETER);
final SafeFuture<Optional<List<DataColumnSidecar>>> future =
chainDataProvider.getDataColumnSidecars(
Expand All @@ -91,7 +91,7 @@ public void handleRequest(RestApiRequest request) throws JsonProcessingException
private static SerializableTypeDefinition<List<DataColumnSidecar>> getResponseType(
final SchemaDefinitionCache schemaCache) {
final DeserializableTypeDefinition<DataColumnSidecar> dataColumnSidecarType =
SchemaDefinitionsElectra.required(schemaCache.getSchemaDefinition(SpecMilestone.ELECTRA))
SchemaDefinitionsEip7594.required(schemaCache.getSchemaDefinition(SpecMilestone.ELECTRA))
.getDataColumnSidecarSchema()
.getJsonTypeDefinition();
return SerializableTypeDefinition.<List<DataColumnSidecar>>object()
Expand Down

0 comments on commit eebec12

Please sign in to comment.