Skip to content

Commit

Permalink
Puts create_tmp_accounts_dir_for_tests() behind DCOU
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo committed Nov 10, 2023
1 parent 60d267a commit ec8b9e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runtime/src/snapshot_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2170,6 +2170,11 @@ pub fn should_take_incremental_snapshot(
&& last_full_snapshot_slot.is_some()
}

/// Creates an "accounts path" directory for tests
///
/// This temporary directory will contain the "run" and "snapshot"
/// sub-directories required by a validator.
#[cfg(feature = "dev-context-only-utils")]
pub fn create_tmp_accounts_dir_for_tests() -> (TempDir, PathBuf) {
let tmp_dir = tempfile::TempDir::new().unwrap();
let account_dir = create_accounts_run_and_snapshot_dirs(&tmp_dir).unwrap().0;
Expand Down

0 comments on commit ec8b9e9

Please sign in to comment.