Moves create_all_accounts_run_and_snapshot_dirs() into accounts-db utils #34877
+152
−152
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
We're trying to remove the
fs-err
crate. For more information, please refer to #34838.Basically the last hold-outs are in snapshot_utils. And while looking at the code, I saw that
snapshot_utils::create_all_accounts_run_and_snapshot_dirs()
et al just wrap functions insideaccounts_db.rs
, and then change the returned error type. Also strange, the test for this function is insnapshot_bank_utils.rs
.These functions are kind of for snapshots, but more for accounts-db. And there's no need for the wrapper functions. So lets have all the code and tests in a single location.
Summary of Changes
create_all_accounts_run_and_snapshot_dirs()
et al functions into a newutils
module within theaccounts-db
crate.snapshot_utils.rs
Note that basically zero code was changed in the move. I did add constants for the
"run"
and"snapshot"
string literals though.This PR is a prereq to further cleanup
snapshot_utils.rs
.