diff --git a/ledger-tool/src/main.rs b/ledger-tool/src/main.rs index 7f778c62e1..ce8ea29c1d 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -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);