11defmodule BeaconApi.V1.NodeController do
22 use BeaconApi , :controller
33
4- require Logger
54 alias BeaconApi.ApiSpec
65 alias BeaconApi.Utils
76 alias LambdaEthereumConsensus.Beacon.SyncBlocks
@@ -29,7 +28,6 @@ defmodule BeaconApi.V1.NodeController do
2928
3029 @ spec health ( Plug.Conn . t ( ) , any ) :: Plug.Conn . t ( )
3130 def health ( conn , _params ) do
32- Logger . info ( "NODE: Health check" )
3331 % { is_syncing: syncing? } = SyncBlocks . status ( )
3432 syncing_status = if syncing? , do: 206 , else: 200
3533
@@ -40,7 +38,6 @@ defmodule BeaconApi.V1.NodeController do
4038
4139 @ spec identity ( Plug.Conn . t ( ) , any ) :: Plug.Conn . t ( )
4240 def identity ( conn , _params ) do
43- Logger . info ( "NODE: Identity check" )
4441 metadata = Metadata . get_metadata ( ) |> Utils . to_json ( )
4542
4643 % {
@@ -64,7 +61,6 @@ defmodule BeaconApi.V1.NodeController do
6461
6562 @ spec version ( Plug.Conn . t ( ) , any ) :: Plug.Conn . t ( )
6663 def version ( conn , _params ) do
67- Logger . info ( "NODE: Version check" )
6864 version = Application . spec ( :lambda_ethereum_consensus ) [ :vsn ]
6965 arch = :erlang . system_info ( :system_architecture )
7066
@@ -78,7 +74,6 @@ defmodule BeaconApi.V1.NodeController do
7874
7975 @ spec syncing ( Plug.Conn . t ( ) , any ) :: Plug.Conn . t ( )
8076 def syncing ( conn , _params ) do
81- Logger . info ( "NODE: Syncing check" )
8277 % {
8378 is_syncing: is_syncing ,
8479 is_optimistic: is_optimistic ,
@@ -95,17 +90,4 @@ defmodule BeaconApi.V1.NodeController do
9590 "sync_distance" => sync_distance |> Integer . to_string ( )
9691 } } )
9792 end
98-
99- @ spec peers ( Plug.Conn . t ( ) , any ) :: Plug.Conn . t ( )
100- def peers ( conn , _params ) do
101- Logger . info ( "NODE: Peers check" )
102- # TODO: (#1325) This is a stub.
103- conn
104- |> json ( % {
105- "data" => [ % { } ] ,
106- "meta" => % {
107- "count" => 0
108- }
109- } )
110- end
11193end
0 commit comments