mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 18:21:45 +00:00
Advertise --advertise-false-custody-group-count for testing PeerDAS (#7593)
#6973
This commit is contained in:
@@ -68,6 +68,16 @@ pub fn cli_app() -> Command {
|
||||
.hide(true)
|
||||
.display_order(0)
|
||||
)
|
||||
.arg(
|
||||
// TODO(das): remove this before PeerDAS release
|
||||
Arg::new("advertise-false-custody-group-count")
|
||||
.long("advertise-false-custody-group-count")
|
||||
.action(ArgAction::Set)
|
||||
.help_heading(FLAG_HEADER)
|
||||
.help("Advertises a false CGC for testing PeerDAS. Do NOT use in production.")
|
||||
.hide(true)
|
||||
.display_order(0)
|
||||
)
|
||||
.arg(
|
||||
Arg::new("enable-sampling")
|
||||
.long("enable-sampling")
|
||||
|
||||
@@ -8,7 +8,7 @@ use beacon_chain::graffiti_calculator::GraffitiOrigin;
|
||||
use beacon_chain::TrustedSetup;
|
||||
use clap::{parser::ValueSource, ArgMatches, Id};
|
||||
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;
|
||||
@@ -1197,6 +1197,12 @@ pub fn set_network_config(
|
||||
config.import_all_attestations = true;
|
||||
}
|
||||
|
||||
if let Some(advertise_false_custody_group_count) =
|
||||
parse_optional(cli_args, "advertise-false-custody-group-count")?
|
||||
{
|
||||
config.advertise_false_custody_group_count = Some(advertise_false_custody_group_count);
|
||||
}
|
||||
|
||||
if parse_flag(cli_args, "shutdown-after-sync") {
|
||||
config.shutdown_after_sync = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user