Add Tests for Bellatrix CLI flags/Fix Peer Scoring

This commit is contained in:
Mark Mackey
2022-02-01 16:22:49 -06:00
parent 3df6da84ed
commit 467eb44858
10 changed files with 173 additions and 8 deletions

View File

@@ -95,6 +95,15 @@ fn main<T: EthSpec>(
serde_json::to_writer(&mut file, &config_sz)
.map_err(|e| format!("Error serializing config: {:?}", e))?;
}
if let Some(dump_path) = clap_utils::parse_optional::<PathBuf>(lh_matches, "dump-chain-config")?
{
let chain_config =
types::Config::from_chain_spec::<T>(&eth2_network_config.chain_spec::<T>()?);
let mut file = File::create(dump_path)
.map_err(|e| format!("Failed to create dumped chain config: {:?}", e))?;
serde_yaml::to_writer(&mut file, &chain_config)
.map_err(|e| format!("Error serializing chain config: {:?}", e))?;
}
// Run the boot node
if !lh_matches.is_present("immediate-shutdown") {