mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-30 11:24:31 +00:00
Enable mplex by default and change --enable-mplex to take bool (#9476)
Enable Mplex by default, and let `--enable-mplex` take a bool argument. Co-Authored-By: Daniel Knopik <daniel@dknopik.de> Co-Authored-By: Michael Sproul <michael@sigmaprime.io> Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
This commit is contained in:
@@ -390,9 +390,12 @@ pub fn cli_app() -> Command {
|
||||
.arg(
|
||||
Arg::new("enable-mplex")
|
||||
.long("enable-mplex")
|
||||
.action(ArgAction::SetTrue)
|
||||
.help_heading(FLAG_HEADER)
|
||||
.help("Enables mplex multiplexer alongside yamux. Yamux is preferred when both are available.")
|
||||
.value_name("BOOLEAN")
|
||||
.action(ArgAction::Set)
|
||||
.num_args(0..=1)
|
||||
.default_value("true")
|
||||
.default_missing_value("true")
|
||||
.help("Enables the mplex multiplexer alongside yamux. Yamux is preferred when both are available. Enabled by default; set to \"false\" to disable.")
|
||||
.display_order(0)
|
||||
)
|
||||
.arg(
|
||||
|
||||
@@ -7,7 +7,7 @@ use beacon_chain::graffiti_calculator::GraffitiOrigin;
|
||||
use bls::PublicKeyBytes;
|
||||
use clap::{ArgMatches, Id, parser::ValueSource};
|
||||
use clap_utils::flags::DISABLE_MALLOC_TUNING_FLAG;
|
||||
use clap_utils::{parse_flag, parse_required};
|
||||
use clap_utils::{parse_flag, parse_optional, parse_required};
|
||||
use client::{ClientConfig, ClientGenesis};
|
||||
use directory::{DEFAULT_BEACON_NODE_DIR, DEFAULT_NETWORK_DIR, DEFAULT_ROOT_DIR};
|
||||
use environment::RuntimeContext;
|
||||
@@ -1434,8 +1434,8 @@ pub fn set_network_config(
|
||||
config.disable_quic_support = true;
|
||||
}
|
||||
|
||||
if parse_flag(cli_args, "enable-mplex") {
|
||||
config.enable_mplex = true;
|
||||
if let Some(enable_mplex) = parse_optional(cli_args, "enable-mplex")? {
|
||||
config.enable_mplex = enable_mplex;
|
||||
}
|
||||
|
||||
if parse_flag(cli_args, "disable-upnp") {
|
||||
|
||||
Reference in New Issue
Block a user