Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ledger-tool: save new snapshots to --snapshot-archive-path #24883

Merged
merged 1 commit into from
May 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions ledger-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ fn main() {
.index(2)
.value_name("DIR")
.takes_value(true)
.help("Output directory for the snapshot [default: --ledger directory]"),
.help("Output directory for the snapshot [default: --snapshot-archive-path if present else --ledger directory]"),
)
.arg(
Arg::with_name("warp_slot")
Expand Down Expand Up @@ -2185,7 +2185,10 @@ fn main() {
}
("create-snapshot", Some(arg_matches)) => {
let output_directory = value_t!(arg_matches, "output_directory", PathBuf)
.unwrap_or_else(|_| ledger_path.clone());
.unwrap_or_else(|_| match &snapshot_archive_path {
Some(snapshot_archive_path) => snapshot_archive_path.clone(),
None => ledger_path.clone(),
});
let mut warp_slot = value_t!(arg_matches, "warp_slot", Slot).ok();
let remove_stake_accounts = arg_matches.is_present("remove_stake_accounts");
let new_hard_forks = hardforks_of(arg_matches, "hard_forks");
Expand Down