Skip to content

Commit

Permalink
Fix param errors
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangzhu70 committed Apr 18, 2023
1 parent 06bf783 commit c4204dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core/src/snapshot_packager_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,11 @@ mod tests {
.collect();

// Create directory of hard links for snapshots
let link_snapshots_dir = tempfile::tempdir_in(temp_dir).unwrap();
let link_snapshots_dir_tmp = tempfile::tempdir_in(temp_dir).unwrap();
let link_snapshots_dir = link_snapshots_dir_tmp.path().to_path_buf();
for snapshots_path in snapshots_paths {
let snapshot_file_name = snapshots_path.file_name().unwrap();
let link_snapshots_dir = link_snapshots_dir.path().join(snapshot_file_name);
let link_snapshots_dir = link_snapshots_dir.join(snapshot_file_name);
fs::create_dir_all(&link_snapshots_dir).unwrap();
let link_path = link_snapshots_dir.join(snapshot_file_name);
fs::hard_link(&snapshots_path, link_path).unwrap();
Expand Down Expand Up @@ -333,7 +334,7 @@ mod tests {
snapshots_dir,
accounts_dir,
archive_format,
snapshot_utils::VerifyBank::Deterministic,
snapshot_utils::VerifyBank::Deterministic(slot),
);
}

Expand All @@ -353,7 +354,7 @@ mod tests {
archive_format: ArchiveFormat::Tar,
},
block_height: slot,
snapshot_links: TempDir::new().unwrap(),
snapshot_links: PathBuf::default(),
snapshot_storages: Vec::default(),
snapshot_version: SnapshotVersion::default(),
snapshot_type,
Expand Down
1 change: 1 addition & 0 deletions core/tests/snapshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use {
snapshot_utils::{
self, ArchiveFormat,
SnapshotVersion::{self, V1_2_0},
MAX_BANK_SNAPSHOTS_TO_RETAIN,
},
status_cache::MAX_CACHE_ENTRIES,
},
Expand Down

0 comments on commit c4204dd

Please sign in to comment.