Name snapshots consistently (#19346)
#### Problem Snapshot names are overloaded, and there are multiple terms that mean the same thing. This is confusing. Here's a list of ones in the codebase that I've found: ``` - snapshot_dir - snapshots_dir - snapshot_path - snapshot_output_dir - snapshot_package_output_path - snapshot_archives_dir ``` #### Summary of Changes For all the ones that are about the directory where snapshot archives are stored, ensure they are `snapshot_archives_dir`. For the ones about the (bank) snapshots directory, set to `bank_snapshots_dir`. Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
@ -42,15 +42,15 @@ pub fn load(
|
||||
) -> LoadResult {
|
||||
if let Some(snapshot_config) = snapshot_config {
|
||||
info!(
|
||||
"Initializing snapshot path: {}",
|
||||
snapshot_config.snapshot_path.display()
|
||||
"Initializing bank snapshot path: {}",
|
||||
snapshot_config.bank_snapshots_dir.display()
|
||||
);
|
||||
let _ = fs::remove_dir_all(&snapshot_config.snapshot_path);
|
||||
fs::create_dir_all(&snapshot_config.snapshot_path)
|
||||
let _ = fs::remove_dir_all(&snapshot_config.bank_snapshots_dir);
|
||||
fs::create_dir_all(&snapshot_config.bank_snapshots_dir)
|
||||
.expect("Couldn't create snapshot directory");
|
||||
|
||||
if snapshot_utils::get_highest_full_snapshot_archive_info(
|
||||
&snapshot_config.snapshot_package_output_path,
|
||||
&snapshot_config.snapshot_archives_dir,
|
||||
)
|
||||
.is_some()
|
||||
{
|
||||
@ -118,8 +118,8 @@ fn load_from_snapshot(
|
||||
}
|
||||
|
||||
let (deserialized_bank, timings) = snapshot_utils::bank_from_latest_snapshot_archives(
|
||||
&snapshot_config.snapshot_path,
|
||||
&snapshot_config.snapshot_package_output_path,
|
||||
&snapshot_config.bank_snapshots_dir,
|
||||
&snapshot_config.snapshot_archives_dir,
|
||||
&account_paths,
|
||||
&process_options.frozen_accounts,
|
||||
genesis_config,
|
||||
|
Reference in New Issue
Block a user