-
Notifications
You must be signed in to change notification settings - Fork 256
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
check whether accounts and snapshots are using the same path #1853
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Hilariously", the "snapshots" subdirectory is not standard...
--snapshots
will create a "snapshots" subdirectory
--accounts
will create a "snapshot" subdirectory
note the missing S above!
But, when using ledger tool, the subdirectory for snapshots under the ledger path will be "snapshot" (no S)!
I think we'll want to fixup the ledger-tool stuff. And all of this pain caused by using string literals instead of constants...
I do think enforcing unique-ness here is a good idea. The snapshot-vs-snapshots is confusing, and could cause issues when running ledger-tool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll want to fixup the ledger-tool stuff. And all of this pain caused by using string literals instead of constants...
Yeah, I'm down for making ledger-tool consistent with validator.
Also, I think we should potentially expand further and check for uniqueness of other specifiable paths. A few weeks ago, I hit an issue because I accidentally specified several items to be at the same path (--ledger
) instead of specifying unique sub-directories for each.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me, thanks! Some tiny nits/requests:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…z#1853) * check whether accounts and snapshots are using the same path * patch and update test * remove new line * align
Problem
both
accounts
andsnapshots
have the same name subdirectory,snapshot
. catch this situation earlier to prevent unexpected behavior.Summary of Changes