Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't init datadir if it doesn't exist in db command #9257

Closed
mattsse opened this issue Jul 3, 2024 · 2 comments
Closed

Don't init datadir if it doesn't exist in db command #9257

mattsse opened this issue Jul 3, 2024 · 2 comments
Assignees
Labels
A-cli Related to the reth CLI A-db Related to the database C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Jul 3, 2024

Describe the feature

this will always initialize the dir:

let Environment { provider_factory, .. } = $env.init(AccessRights::RO)?;

this shouldn't be the case if --datadir does not exist

TODO

  • ensure provided datadir exists in db command

Additional context

running db against a non existing datadir will create it:

reth db --datadir ../does-not-exist clear mdbx StoragesTrie

@mattsse mattsse added C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started A-db Related to the database A-cli Related to the reth CLI labels Jul 3, 2024
@yutianwu
Copy link
Contributor

yutianwu commented Jul 3, 2024

can I take this?

@mattsse
Copy link
Collaborator Author

mattsse commented Jul 3, 2024

assigned, ty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Related to the reth CLI A-db Related to the database C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

No branches or pull requests

2 participants