mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 11:41:51 +00:00
upgrade clap to v4.5 (#5273)
* upgrade clap to v4.5 * cli fixes * Merge branch 'unstable' of https://github.com/sigp/lighthouse into upgrade-clap-cli * value parser for mnemonic * Merge branch 'unstable' of https://github.com/sigp/lighthouse into upgrade-clap-cli * merge unstable * default --format val * fix eth sim * fix eth sim * merge conflicts * resolve beta compiler issue * add num args, version * add custom flag parser, make rate limiter flags clap friendly * remove unneeded check * fmt * update * alphabetic order * resolve merge conflict * fix test * resolve conflicts * fix test * revert removed if statement * fmt got me again * fix broken flag * make cli * make cli * update * remove -e files * update * cli help updates * Merge branch 'unstable' of https://github.com/sigp/lighthouse into upgrade-clap-cli * cli help updates * md files * merge conflict * merge conflicts * md * help text, text width, and a few flag fixes * fmt * merge * revert * revert * resolve merge conflicts * merge conflicts * revert simulator changes * require at least one arg * fix eth sim cli * resolve merge conflicts * book changes * md changes * cli check * cli check * retry cli check * retry cli check * Merge branch 'unstable' of https://github.com/sigp/lighthouse into upgrade-clap-cli * cli * Merge remote-tracking branch 'origin/unstable' into upgrade-clap-cli * Update CLI docs for Goerli removal * Fix cargo lock
This commit is contained in:
@@ -25,11 +25,10 @@ pub struct BootNodeConfig<E: EthSpec> {
|
||||
|
||||
impl<E: EthSpec> BootNodeConfig<E> {
|
||||
pub async fn new(
|
||||
matches: &ArgMatches<'_>,
|
||||
matches: &ArgMatches,
|
||||
eth2_network_config: &Eth2NetworkConfig,
|
||||
) -> Result<Self, String> {
|
||||
let data_dir = get_data_dir(matches);
|
||||
|
||||
// Try and obtain bootnodes
|
||||
|
||||
let boot_nodes = {
|
||||
@@ -39,7 +38,7 @@ impl<E: EthSpec> BootNodeConfig<E> {
|
||||
boot_nodes.extend_from_slice(enr);
|
||||
}
|
||||
|
||||
if let Some(nodes) = matches.value_of("boot-nodes") {
|
||||
if let Some(nodes) = matches.get_one::<String>("boot-nodes") {
|
||||
boot_nodes.extend_from_slice(
|
||||
&nodes
|
||||
.split(',')
|
||||
@@ -81,14 +80,14 @@ impl<E: EthSpec> BootNodeConfig<E> {
|
||||
};
|
||||
|
||||
// By default this is enabled. If it is not set, revert to false.
|
||||
if !matches.is_present("enable-enr-auto-update") {
|
||||
if !matches.get_flag("enable-enr-auto-update") {
|
||||
network_config.discv5_config.enr_update = false;
|
||||
}
|
||||
|
||||
let private_key = load_private_key(&network_config, &logger);
|
||||
let local_key = CombinedKey::from_libp2p(private_key)?;
|
||||
|
||||
let local_enr = if let Some(dir) = matches.value_of("network-dir") {
|
||||
let local_enr = if let Some(dir) = matches.get_one::<String>("network-dir") {
|
||||
let network_dir: PathBuf = dir.into();
|
||||
load_enr_from_disk(&network_dir)?
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user