Skip to content

Commit

Permalink
cleanup and removed diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-o committed Oct 16, 2024
1 parent 0ad9cd5 commit 147200e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
context: .
file: ./Dockerfile
load: true # Important for building without pushing

smoke:
name: Start and stop the node
needs: [compile-native, download-beacon-node-oapi]
Expand Down
32 changes: 0 additions & 32 deletions consensus-test.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions lib/beacon_api/controllers/v1/config_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ defmodule BeaconApi.V1.ConfigController do
def open_api_operation(:get_spec),
do: ApiSpec.spec().paths["/eth/v1/config/spec"].get

# TODO: This is still an incomplete implementation, it should return some constants
# along with the chain spec. It's enough for assertoor.
@spec get_spec(Plug.Conn.t(), any) :: Plug.Conn.t()
def get_spec(conn, _params), do: json(conn, %{"data" => chain_spec()})

Expand Down
18 changes: 0 additions & 18 deletions lib/beacon_api/controllers/v1/node_controller.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
defmodule BeaconApi.V1.NodeController do
use BeaconApi, :controller

require Logger
alias BeaconApi.ApiSpec
alias BeaconApi.Utils
alias LambdaEthereumConsensus.Beacon.SyncBlocks
Expand Down Expand Up @@ -29,7 +28,6 @@ defmodule BeaconApi.V1.NodeController do

@spec health(Plug.Conn.t(), any) :: Plug.Conn.t()
def health(conn, _params) do
Logger.info("NODE: Health check")
%{is_syncing: syncing?} = SyncBlocks.status()
syncing_status = if syncing?, do: 206, else: 200

Expand All @@ -40,7 +38,6 @@ defmodule BeaconApi.V1.NodeController do

@spec identity(Plug.Conn.t(), any) :: Plug.Conn.t()
def identity(conn, _params) do
Logger.info("NODE: Identity check")
metadata = Metadata.get_metadata() |> Utils.to_json()

%{
Expand All @@ -64,7 +61,6 @@ defmodule BeaconApi.V1.NodeController do

@spec version(Plug.Conn.t(), any) :: Plug.Conn.t()
def version(conn, _params) do
Logger.info("NODE: Version check")
version = Application.spec(:lambda_ethereum_consensus)[:vsn]
arch = :erlang.system_info(:system_architecture)

Expand All @@ -78,7 +74,6 @@ defmodule BeaconApi.V1.NodeController do

@spec syncing(Plug.Conn.t(), any) :: Plug.Conn.t()
def syncing(conn, _params) do
Logger.info("NODE: Syncing check")
%{
is_syncing: is_syncing,
is_optimistic: is_optimistic,
Expand All @@ -95,17 +90,4 @@ defmodule BeaconApi.V1.NodeController do
"sync_distance" => sync_distance |> Integer.to_string()
}})
end

@spec peers(Plug.Conn.t(), any) :: Plug.Conn.t()
def peers(conn, _params) do
Logger.info("NODE: Peers check")
# TODO: (#1325) This is a stub.
conn
|> json(%{
"data" => [%{}],
"meta" => %{
"count" => 0
}
})
end
end

0 comments on commit 147200e

Please sign in to comment.