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

Testnet "--private-key" command-line options is duplicated #399

Closed
wackou opened this issue Sep 14, 2017 · 6 comments
Closed

Testnet "--private-key" command-line options is duplicated #399

wackou opened this issue Sep 14, 2017 · 6 comments

Comments

@wackou
Copy link
Contributor

wackou commented Sep 14, 2017

and hence cannot be specified on the command-line, as it fails with the following error:

Error parsing command line: option '--private-key' is ambiguous and matches different versions of '--private-key'

this comes from the fact the both the witness plugin and the debug-witness define the --private-key option. A simple fix would be to rename the option for the debug-witness plugin to something like --private-key-testnet or something to that effect.

I'll submit a pull request if I can get confirmation that --private-key-testnet is a good naming, otherwise please suggest an alternative and I'll implement that. Thanks!

@pmconrad
Copy link
Contributor

pmconrad commented Sep 14, 2017

Dang, that should've been fixed here - 0011d5f
But apparently only if you put the private key into config.ini.

@wackou
Copy link
Contributor Author

wackou commented Sep 18, 2017

yeah, it's not exactly the same thing. What you fixed in the given commit is specifying a value for the private-key option multiple times in the config.ini. The problem I'm having is that I'm only specifying a value for that option once, but there are 2 matchings options with the same name that are being declared: the one from the witness plugin, and the one from the debug_witness plugin, hence boost complaining (as they are both instantiated in the testnet branch, see: https://github.com/bitshares/bitshares-core/blob/test-2.0.170909/programs/witness_node/main.cpp#L77-L78 )

One solution would be to not instantiate both plugins at the same time, but I don't know if debug_witness is supposed to replace witness, or supplement it. The other solution I'm thinking of is renaming the option for the debug_witness plugin.

@pmconrad
Copy link
Contributor

My commit fixes the same problem you ran into, but only for the private-key option in the config file, not on the command line. I don't see a similar solution for the command line.

Perhaps we should introduce namespaces for the options used by plugins, so they don't overlap.

wackou added a commit to wackou/bts_tools that referenced this issue Oct 12, 2017
@abitmore
Copy link
Member

This issue is now in production. The reason why we need to use the command line args is this issue: #149.

@abitmore
Copy link
Member

PR #443 submitted, renamed the option in debug_witness to debug-private-key. It may break apps which depend on debug_witness plugin, perhaps including some tests. But IMHO this issue has higher priority. We may also need to review/update the docs of debug_witness plugin.

pmconrad added a commit that referenced this issue Oct 28, 2017
Rename option of debug witness plugin, fix #399
@wackou
Copy link
Contributor Author

wackou commented Oct 29, 2017

Thanks, this looks indeed like the least-friction solution for now. It might not be perfect but does the job for now, so closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants