Skip to content

Commit

Permalink
feat: enable beacon API when specifying port (#1026)
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaRedHand authored Apr 23, 2024
1 parent 94517d8 commit 5115db5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ testnet_dir = Keyword.get(args, :testnet_dir)
enable_metrics = Keyword.get(args, :metrics, false)
metrics_port = Keyword.get(args, :metrics_port, if(enable_metrics, do: 9568, else: nil))
validator_file = Keyword.get(args, :validator_file)
enable_beacon_api = Keyword.get(args, :beacon_api, false)
beacon_api_port = Keyword.get(args, :beacon_api_port, 4000)
beacon_api_port = Keyword.get(args, :beacon_api_port, nil)
enable_beacon_api = Keyword.get(args, :beacon_api, not is_nil(beacon_api_port))
discovery_port = Keyword.get(args, :discovery_port, 9000)

if not is_nil(testnet_dir) and not is_nil(checkpoint_sync_url) do
Expand Down Expand Up @@ -133,7 +133,7 @@ alias BeaconApi

config :lambda_ethereum_consensus, BeaconApi.Endpoint,
server: enable_beacon_api,
http: [port: beacon_api_port],
http: [port: beacon_api_port || 4000],
url: [host: "localhost"],
render_errors: [
formats: [json: BeaconApi.ErrorJSON],
Expand Down

0 comments on commit 5115db5

Please sign in to comment.