Uses SNAPSHOT_VERSION_FILENAME constant (#31508)
This commit is contained in:
parent
d8664397b6
commit
c7d922f229
|
@ -1978,7 +1978,7 @@ fn build_storage_from_snapshot_dir(
|
|||
) -> Result<AccountStorageMap> {
|
||||
let bank_snapshot_dir = &snapshot_info.snapshot_dir;
|
||||
let snapshot_file_path = &snapshot_info.snapshot_path();
|
||||
let snapshot_version_path = bank_snapshot_dir.join("version");
|
||||
let snapshot_version_path = bank_snapshot_dir.join(SNAPSHOT_VERSION_FILENAME);
|
||||
let (file_sender, file_receiver) = crossbeam_channel::unbounded();
|
||||
|
||||
let accounts_hardlinks = bank_snapshot_dir.join(SNAPSHOT_ACCOUNTS_HARDLINKS);
|
||||
|
|
|
@ -464,7 +464,10 @@ pub(crate) fn get_slot_and_append_vec_id(filename: &str) -> (Slot, usize) {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use {super::*, crate::append_vec::AppendVec};
|
||||
use {
|
||||
super::*,
|
||||
crate::{append_vec::AppendVec, snapshot_utils::SNAPSHOT_VERSION_FILENAME},
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn test_get_unique_append_vec_id() {
|
||||
|
@ -492,7 +495,7 @@ mod tests {
|
|||
assert_eq!(None, get_snapshot_file_kind("file.txt"));
|
||||
assert_eq!(
|
||||
Some(SnapshotFileKind::Version),
|
||||
get_snapshot_file_kind("version")
|
||||
get_snapshot_file_kind(SNAPSHOT_VERSION_FILENAME)
|
||||
);
|
||||
assert_eq!(
|
||||
Some(SnapshotFileKind::BankFields),
|
||||
|
|
Loading…
Reference in New Issue