Add genesis subcommand

This commit is contained in:
Michael Vines 2020-02-24 10:19:29 -07:00
parent 73063544bd
commit 1ef3478709
1 changed files with 7 additions and 0 deletions

View File

@ -616,6 +616,10 @@ fn main() {
.help("List of slots to print"),
)
)
.subcommand(
SubCommand::with_name("genesis")
.about("Prints the ledger's genesis config")
)
.subcommand(
SubCommand::with_name("genesis-hash")
.about("Prints the ledger's genesis hash")
@ -763,6 +767,9 @@ fn main() {
LedgerOutputMethod::Print,
);
}
("genesis", Some(_arg_matches)) => {
println!("{}", open_genesis_config(&ledger_path));
}
("genesis-hash", Some(_arg_matches)) => {
println!("{}", open_genesis_config(&ledger_path).hash());
}