From 009465b23ab522a5c210d734cedaf18e20927599 Mon Sep 17 00:00:00 2001 From: Dmitrii Shmatko Date: Sun, 24 Mar 2024 17:44:59 +0400 Subject: [PATCH] Move GetDepositSnapshot to beacon APIs package (cause official API already) --- .../tekuv1/beacon/GetDepositSnapshotIntegrationTest.java | 2 +- .../teku/beaconrestapi/JsonTypeDefinitionBeaconRestApi.java | 4 ++-- .../handlers/{tekuv1 => v1}/beacon/GetDepositSnapshot.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/{tekuv1 => v1}/beacon/GetDepositSnapshot.java (98%) diff --git a/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/tekuv1/beacon/GetDepositSnapshotIntegrationTest.java b/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/tekuv1/beacon/GetDepositSnapshotIntegrationTest.java index 6b539a53014..6d35839e1d4 100644 --- a/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/tekuv1/beacon/GetDepositSnapshotIntegrationTest.java +++ b/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/tekuv1/beacon/GetDepositSnapshotIntegrationTest.java @@ -26,7 +26,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import tech.pegasys.teku.beaconrestapi.AbstractDataBackedRestAPIIntegrationTest; -import tech.pegasys.teku.beaconrestapi.handlers.tekuv1.beacon.GetDepositSnapshot; +import tech.pegasys.teku.beaconrestapi.handlers.v1.beacon.GetDepositSnapshot; import tech.pegasys.teku.ethereum.pow.api.DepositTreeSnapshot; import tech.pegasys.teku.infrastructure.http.ContentTypes; import tech.pegasys.teku.infrastructure.json.JsonUtil; diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/JsonTypeDefinitionBeaconRestApi.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/JsonTypeDefinitionBeaconRestApi.java index 480ee9fec01..33c8b30ce97 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/JsonTypeDefinitionBeaconRestApi.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/JsonTypeDefinitionBeaconRestApi.java @@ -29,7 +29,6 @@ import tech.pegasys.teku.beaconrestapi.handlers.tekuv1.admin.PutLogLevel; import tech.pegasys.teku.beaconrestapi.handlers.tekuv1.admin.Readiness; import tech.pegasys.teku.beaconrestapi.handlers.tekuv1.beacon.GetAllBlocksAtSlot; -import tech.pegasys.teku.beaconrestapi.handlers.tekuv1.beacon.GetDepositSnapshot; import tech.pegasys.teku.beaconrestapi.handlers.tekuv1.beacon.GetDeposits; import tech.pegasys.teku.beaconrestapi.handlers.tekuv1.beacon.GetEth1Data; import tech.pegasys.teku.beaconrestapi.handlers.tekuv1.beacon.GetEth1DataCache; @@ -46,6 +45,7 @@ import tech.pegasys.teku.beaconrestapi.handlers.v1.beacon.GetBlockHeader; import tech.pegasys.teku.beaconrestapi.handlers.v1.beacon.GetBlockHeaders; import tech.pegasys.teku.beaconrestapi.handlers.v1.beacon.GetBlockRoot; +import tech.pegasys.teku.beaconrestapi.handlers.v1.beacon.GetDepositSnapshot; import tech.pegasys.teku.beaconrestapi.handlers.v1.beacon.GetFinalizedBlockRoot; import tech.pegasys.teku.beaconrestapi.handlers.v1.beacon.GetFinalizedCheckpointState; import tech.pegasys.teku.beaconrestapi.handlers.v1.beacon.GetGenesis; @@ -240,6 +240,7 @@ private static RestApi create( .endpoint(new PostVoluntaryExit(dataProvider)) .endpoint(new PostSyncCommittees(dataProvider)) .endpoint(new PostValidatorLiveness(dataProvider)) + .endpoint(new GetDepositSnapshot(eth1DataProvider)) // Event Handler .endpoint( new GetEvents( @@ -302,7 +303,6 @@ private static RestApi create( .endpoint(new GetEth1Data(dataProvider, eth1DataProvider)) .endpoint(new GetEth1DataCache(eth1DataProvider)) .endpoint(new GetEth1VotingSummary(dataProvider, eth1DataProvider)) - .endpoint(new GetDepositSnapshot(eth1DataProvider)) .endpoint(new GetGlobalValidatorInclusion(dataProvider)) .endpoint(new GetValidatorInclusion(dataProvider)); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetDepositSnapshot.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetDepositSnapshot.java similarity index 98% rename from data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetDepositSnapshot.java rename to data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetDepositSnapshot.java index f67370d4705..c8a748392f5 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetDepositSnapshot.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetDepositSnapshot.java @@ -11,7 +11,7 @@ * specific language governing permissions and limitations under the License. */ -package tech.pegasys.teku.beaconrestapi.handlers.tekuv1.beacon; +package tech.pegasys.teku.beaconrestapi.handlers.v1.beacon; import static tech.pegasys.teku.infrastructure.http.HttpStatusCodes.SC_NOT_FOUND; import static tech.pegasys.teku.infrastructure.http.HttpStatusCodes.SC_OK;