mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Enable Light Client server by default (#6950)
This commit is contained in:
@@ -1494,9 +1494,18 @@ pub fn cli_app() -> Command {
|
||||
.arg(
|
||||
Arg::new("light-client-server")
|
||||
.long("light-client-server")
|
||||
.help("Act as a full node supporting light clients on the p2p network \
|
||||
[experimental]")
|
||||
.help("DEPRECATED")
|
||||
.action(ArgAction::SetTrue)
|
||||
|
||||
.help_heading(FLAG_HEADER)
|
||||
.display_order(0)
|
||||
)
|
||||
.arg(
|
||||
Arg::new("disable-light-client-server")
|
||||
.long("disable-light-client-server")
|
||||
.help("Disables light client support on the p2p network")
|
||||
.action(ArgAction::SetTrue)
|
||||
|
||||
.help_heading(FLAG_HEADER)
|
||||
.display_order(0)
|
||||
)
|
||||
|
||||
@@ -176,11 +176,19 @@ pub fn get_config<E: EthSpec>(
|
||||
parse_required(cli_args, "http-duplicate-block-status")?;
|
||||
|
||||
client_config.http_api.enable_light_client_server =
|
||||
cli_args.get_flag("light-client-server");
|
||||
!cli_args.get_flag("disable-light-client-server");
|
||||
}
|
||||
|
||||
if cli_args.get_flag("light-client-server") {
|
||||
client_config.chain.enable_light_client_server = true;
|
||||
warn!(
|
||||
log,
|
||||
"The --light-client-server flag is deprecated. The light client server is enabled \
|
||||
by default"
|
||||
);
|
||||
}
|
||||
|
||||
if cli_args.get_flag("disable-light-client-server") {
|
||||
client_config.chain.enable_light_client_server = false;
|
||||
}
|
||||
|
||||
if let Some(cache_size) = clap_utils::parse_optional(cli_args, "shuffling-cache-size")? {
|
||||
@@ -1419,7 +1427,7 @@ pub fn set_network_config(
|
||||
}
|
||||
|
||||
// Light client server config.
|
||||
config.enable_light_client_server = parse_flag(cli_args, "light-client-server");
|
||||
config.enable_light_client_server = !parse_flag(cli_args, "disable-light-client-server");
|
||||
|
||||
// The self limiter is enabled by default. If the `self-limiter-protocols` flag is not provided,
|
||||
// the default params will be used.
|
||||
|
||||
Reference in New Issue
Block a user