Add print-genesis-hash command (#6849)

This commit is contained in:
Michael Vines 2019-11-08 23:17:48 -07:00 committed by GitHub
parent 68eafb3f30
commit 24a7b0ce74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -286,6 +286,10 @@ fn main() {
.help("The slot to print"),
)
)
.subcommand(
SubCommand::with_name("print-genesis-hash")
.about("Prints the ledger's genesis hash")
)
.subcommand(
SubCommand::with_name("bounds")
.about("Print lowest and highest non-empty slots. Note: This ignores gaps in slots")
@ -397,6 +401,9 @@ fn main() {
let starting_slot = value_t_or_exit!(args_matches, "starting_slot", Slot);
output_ledger(blocktree, starting_slot, LedgerOutputMethod::Print);
}
("print-genesis-hash", Some(_args_matches)) => {
println!("{}", genesis_config.hash());
}
("print-slot", Some(args_matches)) => {
let slot = value_t_or_exit!(args_matches, "slot", Slot);
output_slot(&blocktree, slot, &LedgerOutputMethod::Print);