From 32a60578feaa1beb39c228fa8fb6ded9f423e1ea Mon Sep 17 00:00:00 2001 From: Pawan Dhananjay Date: Mon, 28 Dec 2020 08:23:59 +0000 Subject: [PATCH] Remove default beacon node value from clap (#2121) ## Issue Addressed Fixes #2118 ## Proposed Changes Removes the default value in clap for `--beacon-nodes`. This was causing issues with cli picking `--beacon-nodes` default even when not specified and overriding `--beacon-node`. Seems like it was more evident with docker setups because it doesn't use the default `http://localhost:5052` option. Edit: we already set the default to `http://localhost:5052` here so this shouldn't break any existing setups. https://github.com/sigp/lighthouse/blob/9ed65a64f8fc518c98b381e628556df9bf906acb/validator_client/src/config.rs#L58 ## Additional info Tested this with docker-compose and binaries. Works as expected in both cases. --- validator_client/src/cli.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/validator_client/src/cli.rs b/validator_client/src/cli.rs index 2e888e12eb..caf295d83e 100644 --- a/validator_client/src/cli.rs +++ b/validator_client/src/cli.rs @@ -1,4 +1,3 @@ -use crate::config::DEFAULT_BEACON_NODE; use clap::{App, Arg}; pub fn cli_app<'a, 'b>() -> App<'a, 'b> { @@ -22,8 +21,9 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { Arg::with_name("beacon-nodes") .long("beacon-nodes") .value_name("NETWORK_ADDRESSES") - .help("Comma-separated addresses to one or more beacon node HTTP APIs") - .default_value(&DEFAULT_BEACON_NODE) + .help("Comma-separated addresses to one or more beacon node HTTP APIs. \ + Default is http://localhost:5052." + ) .takes_value(true), ) // This argument is deprecated, use `--beacon-nodes` instead.