-
Notifications
You must be signed in to change notification settings - Fork 95
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
SDK-166 - add custom storage names parameter to DbTool #435
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.
You are assuming that we have always custom storages, but that may not happen.
Since we have already some optional parameters I think we have to switch from "positional" parameters to something identified by a param name:
like:
< program name> [ -s=< storages data dir path > ] [ -n=< custom storage names > ] [ -f=< path to json file > ] < command name > [< json data >]
Please also update the printed hellp:
https://github.com/HorizenOfficial/Sidechains-SDK/blob/db/SDK-166/tools/dbtool/src/main/java/com/horizen/DbToolCommandProcessor.java#L107
Right now the DB tool is only used in the python tests and not by end users. Moreover, changes in the DB tool interface will introduce a difference with the Bootstrapping tools (of the same package) that still reads the parameters in a positional manner. With the last commit I updated the printed helper and the python test sc_storage_recovery_without_csw |
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.
It works.
In general I'm thinking why do we need at all the checks against the storageNames
set in the DB pool. Instead we can set the only argument - full path to the storage, then inside we will check if the file exists and will try to open this level db based storage.
@alsala what do you think?
Replaced by #509 |
In this pull request: