Skip to content

util: Add SetupHelpOptions() - #15358

Merged
laanwj merged 1 commit into
bitcoin:masterfrom
maflcko:Mf1902-Help
Feb 12, 2019
Merged

laanwj merged 1 commit into
bitcoin:masterfrom
maflcko:Mf1902-Help

Conversation

@maflcko

@maflcko maflcko commented Feb 6, 2019

Copy link
Copy Markdown
Member

Every binary we have sets up the help option in their own way and wording.

Solve that by having one function take care of it for all of them.

@promag promag left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK.

Comment thread src/util/system.cpp Resolved
@DrahtBot

DrahtBot commented Feb 6, 2019

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #15307 ([WIP] [tool] Add salvage and zaptxs commands to bitcoin-wallet by jnewbery)
  • #13716 (bitcoin-cli: -stdinwalletpassphrase and non-echo stdin passwords by kallewoof)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

Comment thread src/util/system.h
bool HelpRequested(const ArgsManager& args);

/** Add help options to the args manager */
void SetupHelpOptions(ArgsManager& args);

@promag promag Feb 7, 2019 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, how about this as a member, like ArgsManager::SetupHelpOptions?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general the args are module specific (wallet, node, gui, chain, mempool, ...) so the args manager should not know about them. This is also in line with how we Setup*Options() for all other modules.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @MarcoFalke here. It is not the responsibility of ArgsManager to know about or hardcode specific options.

@practicalswift

Copy link
Copy Markdown
Contributor

Concept ACK

@Empact

Empact commented Feb 9, 2019

Copy link
Copy Markdown
Contributor

utACK a99999c

@laanwj

laanwj commented Feb 12, 2019

Copy link
Copy Markdown
Member

utACK a99999c

@laanwj
laanwj merged commit a99999c into bitcoin:master Feb 12, 2019
laanwj added a commit that referenced this pull request Feb 12, 2019
a99999c util: Add SetupHelpOptions() (MarcoFalke)

Pull request description:

  Every binary we have sets up the help option in their own way and wording.

  Solve that by having one function take care of it for all of them.

Tree-SHA512: 6e947fa8bc2a46fa6ca9f45777020aa269a5df0dd916ebc863224f9a1e0f79e8e7754a1478567307edd9461e8babd77d26bc2710bbd56e8f8da9020aa85a8c9c
@maflcko
maflcko deleted the Mf1902-Help branch February 12, 2019 16:06
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 21, 2020
Summary: This is a backport of Core [[bitcoin/bitcoin#15358 | PR15358]]

Test Plan:
  ninja all check

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8013
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Sep 12, 2021
a99999c util: Add SetupHelpOptions() (MarcoFalke)

Pull request description:

  Every binary we have sets up the help option in their own way and wording.

  Solve that by having one function take care of it for all of them.

Tree-SHA512: 6e947fa8bc2a46fa6ca9f45777020aa269a5df0dd916ebc863224f9a1e0f79e8e7754a1478567307edd9461e8babd77d26bc2710bbd56e8f8da9020aa85a8c9c
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Sep 13, 2021
a99999c util: Add SetupHelpOptions() (MarcoFalke)

Pull request description:

  Every binary we have sets up the help option in their own way and wording.

  Solve that by having one function take care of it for all of them.

Tree-SHA512: 6e947fa8bc2a46fa6ca9f45777020aa269a5df0dd916ebc863224f9a1e0f79e8e7754a1478567307edd9461e8babd77d26bc2710bbd56e8f8da9020aa85a8c9c
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants