Allow starting testnet from JSON state

This commit is contained in:
Paul Hauner
2019-09-02 15:58:53 +10:00
parent ba22d28026
commit 70f4052b2e
6 changed files with 25 additions and 2 deletions

View File

@@ -186,6 +186,7 @@ fn process_testnet_subcommand(
let start_method = match format {
"yaml" => BeaconChainStartMethod::Yaml { file },
"ssz" => BeaconChainStartMethod::Ssz { file },
"json" => BeaconChainStartMethod::Json { file },
other => return Err(format!("Unknown genesis file format: {}", other)),
};

View File

@@ -318,7 +318,7 @@ fn main() {
.arg(Arg::with_name("format")
.value_name("FORMAT")
.required(true)
.possible_values(&["yaml", "ssz"])
.possible_values(&["yaml", "ssz", "json"])
.help("The encoding of the state in the file."))
.arg(Arg::with_name("file")
.value_name("YAML_FILE")
@@ -344,7 +344,7 @@ fn main() {
_ => unreachable!("guarded by clap"),
};
let mut log = slog::Logger::root(drain.fuse(), o!());
let log = slog::Logger::root(drain.fuse(), o!());
warn!(
log,