Move snapshot archive generation out of the SnapshotPackagerService

This commit is contained in:
Michael Vines
2020-01-23 11:20:37 -07:00
parent c945e80618
commit 5d8dc78718
9 changed files with 196 additions and 195 deletions

View File

@@ -323,7 +323,8 @@ fn download_ledger(
download_tar_bz2(rpc_addr, "genesis.tar.bz2", ledger_path, false)?;
if !no_snapshot_fetch {
let snapshot_package = solana_ledger::snapshot_utils::get_snapshot_tar_path(ledger_path);
let snapshot_package =
solana_ledger::snapshot_utils::get_snapshot_archive_path(ledger_path);
if snapshot_package.exists() {
fs::remove_file(&snapshot_package)
.map_err(|err| format!("error removing {:?}: {}", snapshot_package, err))?;