diff --git a/runtime/src/snapshot_package.rs b/runtime/src/snapshot_package.rs index 33b0a91fa366ab..bb90ad99312598 100644 --- a/runtime/src/snapshot_package.rs +++ b/runtime/src/snapshot_package.rs @@ -10,7 +10,7 @@ use { snapshot_hash::SnapshotHash, snapshot_utils::{ self, ArchiveFormat, BankSnapshotInfo, Result, SnapshotVersion, - TMP_BANK_SNAPSHOT_PREFIX, + SNAPSHOT_STATUS_CACHE_FILENAME, TMP_BANK_SNAPSHOT_PREFIX, }, }, log::*, @@ -97,10 +97,12 @@ impl AccountsPackage { &bank_snapshot_info.snapshot_path, snapshot_hardlink_dir.join(file_name), )?; - let status_cache_file_name = - snapshot_utils::path_to_file_name_str(&bank_snapshot_info.status_cache_path)?; + let status_cache_path = bank_snapshot_info + .bank_snapshot_dir + .join(SNAPSHOT_STATUS_CACHE_FILENAME); + let status_cache_file_name = snapshot_utils::path_to_file_name_str(&status_cache_path)?; fs::hard_link( - &bank_snapshot_info.status_cache_path, + &status_cache_path, snapshot_links.path().join(status_cache_file_name), )?; } diff --git a/runtime/src/snapshot_utils.rs b/runtime/src/snapshot_utils.rs index e1304d1efcf2ac..1033e109ebf321 100644 --- a/runtime/src/snapshot_utils.rs +++ b/runtime/src/snapshot_utils.rs @@ -136,12 +136,12 @@ impl SnapshotVersion { pub struct BankSnapshotInfo { /// Slot of the bank pub slot: Slot, - /// Path to the snapshot + /// Path to the snapshot file pub snapshot_path: PathBuf, /// Type of the snapshot pub snapshot_type: BankSnapshotType, - /// Path to the status cache (transaction history) - pub status_cache_path: PathBuf, + /// Path to the bank snapshot directory + pub bank_snapshot_dir: PathBuf, } impl PartialOrd for BankSnapshotInfo { @@ -592,8 +592,6 @@ pub fn get_bank_snapshots(bank_snapshots_dir: impl AsRef) -> Vec) -> Vec) -> Vec