Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 87b13be

Browse files
committed
Remove bank_slot_from_archive
1 parent 0d4cb25 commit 87b13be

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

ledger/src/snapshot_utils.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -429,32 +429,6 @@ pub fn remove_snapshot<P: AsRef<Path>>(slot: Slot, snapshot_path: P) -> Result<(
429429
Ok(())
430430
}
431431

432-
pub fn bank_slot_from_archive<P: AsRef<Path>>(snapshot_tar: P) -> Result<Slot> {
433-
let tempdir = tempfile::TempDir::new()?;
434-
untar_snapshot_in(&snapshot_tar, &tempdir)?;
435-
let unpacked_snapshots_dir = tempdir.path().join(TAR_SNAPSHOTS_DIR);
436-
let local_account_paths = vec![tempdir.path().join("account_dummy")];
437-
let unpacked_accounts_dir = tempdir.path().join(TAR_ACCOUNTS_DIR);
438-
let snapshot_paths = get_snapshot_paths(&unpacked_snapshots_dir);
439-
let last_root_paths = snapshot_paths
440-
.last()
441-
.ok_or_else(|| get_io_error("No snapshots found in snapshots directory"))?;
442-
let bank = deserialize_snapshot_data_file(
443-
&last_root_paths.snapshot_file_path,
444-
MAX_SNAPSHOT_DATA_FILE_SIZE,
445-
|stream| {
446-
let bank: Bank = deserialize_from_snapshot(stream.by_ref())?;
447-
bank.rc.accounts_from_stream(
448-
stream.by_ref(),
449-
&local_account_paths,
450-
&unpacked_accounts_dir,
451-
)?;
452-
Ok(bank)
453-
},
454-
)?;
455-
Ok(bank.slot())
456-
}
457-
458432
pub fn bank_from_archive<P: AsRef<Path>>(
459433
account_paths: &[PathBuf],
460434
snapshot_path: &PathBuf,

0 commit comments

Comments
 (0)