Re-arrange CLI to suit new "testnet" pattern

This commit is contained in:
Paul Hauner
2019-08-23 16:39:32 +10:00
parent bb63d300f2
commit 453c8e2255
5 changed files with 280 additions and 166 deletions

View File

@@ -1,4 +1,4 @@
use crate::{Bootstrapper, Eth2Config};
use crate::Bootstrapper;
use clap::ArgMatches;
use network::NetworkConfig;
use serde_derive::{Deserialize, Serialize};
@@ -127,15 +127,6 @@ impl Config {
self.data_dir = PathBuf::from(dir);
};
if let Some(default_spec) = args.value_of("default-spec") {
match default_spec {
"mainnet" => self.spec_constants = Eth2Config::mainnet().spec_constants,
"minimal" => self.spec_constants = Eth2Config::minimal().spec_constants,
"interop" => self.spec_constants = Eth2Config::interop().spec_constants,
_ => {} // not supported
}
}
if let Some(dir) = args.value_of("db") {
self.db_type = dir.to_string();
};