Move create_dir_all to AccountsDB::new (#7465)

AppendVec create doesn't need to try and create
paths every time and it can stall while snapshot
create is happening.
This commit is contained in:
sakridge
2019-12-13 16:46:16 -08:00
committed by GitHub
parent 7adc721d96
commit 9d5a07bac4
3 changed files with 10 additions and 5 deletions

View File

@ -230,6 +230,7 @@ mod tests {
let snapshot_package_output_path = temp_dir.join("snapshots_output");
fs::create_dir_all(&snapshot_package_output_path).unwrap();
fs::create_dir_all(&accounts_dir).unwrap();
// Create some storage entries
let storage_entries: Vec<_> = (0..5)
.map(|i| Arc::new(AccountStorageEntry::new(&accounts_dir, 0, i, 10)))