Use helper function to produce help text for params of protx rpcs#2649
Merged
Conversation
Copy/paste help for various fields of `register`/`register_prepare` instead of referring to `register_fund` Adjust description of provided functionality and expected results
Member
|
Can we make this set of help output a variable so we don't have to edit it in three places in the future when it changes? |
…ram descriptions in rpcevo in one place
register* rpc commandsprotx rpcs
codablock
reviewed
Jan 28, 2019
|
|
||
| std::string GetHelpString(int nParamNum, std::string strParamName) | ||
| { | ||
| std::map<std::string, std::string> mapParamHelp = { |
There was a problem hiding this comment.
Should be static const as otherwise the whole map is initialized again and again.
codablock
pushed a commit
to codablock/dash
that referenced
this pull request
Feb 5, 2019
…ashpay#2649) * Adjust help text of `register*` rpc commands Copy/paste help for various fields of `register`/`register_prepare` instead of referring to `register_fund` Adjust description of provided functionality and expected results * Adjust whitespaces to match in different protx commands * Add missing results descriptions * Introduce new helper function GetHelpString to concentrate most of param descriptions in rpcevo in one place * [MOVEONLY] Move GetHelpString out of #ifdef ENABLE_WALLET/#endif * static const
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It seems to be a bit confusing the way we organised help for
register*rpcs because you have to runhelptwice - first time to see what params are expected (e.g.help protx register) and then to see what these params actually mean (help protx register_fund).Changes:
register/register_prepareinstead of referring toregister_fund;