Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make discovery port configurable #1014

Merged
merged 4 commits into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ switches = [
validator_file: :string,
log_file: :string,
beacon_api: :boolean,
beacon_api_port: :integer
beacon_api_port: :integer,
discovery_port: :integer
]

is_testing = Config.config_env() == :test
Expand All @@ -44,6 +45,7 @@ metrics_port = Keyword.get(args, :metrics_port, if(enable_metrics, do: 9568, els
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)
discovery_port = Keyword.get(args, :discovery_port, 9000)

if not is_nil(testnet_dir) and not is_nil(checkpoint_sync_url) do
IO.puts("Both checkpoint sync and testnet url specified (only one should be specified).")
Expand Down Expand Up @@ -106,7 +108,7 @@ config :lambda_ethereum_consensus, ChainSpec,
config :lambda_ethereum_consensus, StoreSetup, strategy: strategy

# Configures peer discovery
config :lambda_ethereum_consensus, :discovery, port: 9000, bootnodes: bootnodes
config :lambda_ethereum_consensus, :discovery, port: discovery_port, bootnodes: bootnodes

# Engine API

Expand Down
Loading