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

doc: Clarify rpcwallet flag url change #14448

Merged
merged 1 commit into from Nov 23, 2018

Conversation

Projects
None yet
6 participants
@JBaczuk
Copy link
Contributor

commented Oct 9, 2018

This adds clarification to the bitcoin-cli -rpcwallet flag in the help command. This will benefit users who want to utilize this feature without the cli, for example curl. It isn't readily apparent that this changes the url used in the RPC call.

@promag
Copy link
Member

left a comment

Maybe improve documentation like create doc/RPC-interface.md.

@@ -51,7 +51,7 @@ static void SetupCliArgs()
gArgs.AddArg("-rpcport=<port>", strprintf("Connect to JSON-RPC on <port> (default: %u, testnet: %u, regtest: %u)", defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort(), regtestBaseParams->RPCPort()), false, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcuser=<user>", "Username for JSON-RPC connections", false, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcwait", "Wait for RPC server to start", false, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcwallet=<walletname>", "Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to bitcoind)", false, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcwallet=<walletname>", "Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to bitcoind). This changes the RPC endpoint used, e.g. http://127.0.0.1:8332/wallet/<walletname>", false, OptionsCategory::OPTIONS);

This comment has been minimized.

Copy link
@promag

promag Oct 9, 2018

Member

Is this relevant from the bitcoin-cli user's point of view? At least I'd drop the e.g. ... part here.

This comment has been minimized.

Copy link
@JBaczuk

JBaczuk Oct 10, 2018

Author Contributor

I'm not sure the best place for this, but I think an example url would be helpful somewhere. There are curl examples for each command help, but not for any of the flags.

This comment has been minimized.

Copy link
@ryanofsky

ryanofsky Nov 12, 2018

Contributor

I disagree with meshcollider and promag, and think this information is useful. Or at least I don't understand how it harms anyone. I hate documentation that just gives me a handwavy gloss about how an option is intended to be used without saying what it actually does.

Of course it would also be good to document wallet endpoints in markdown. There is some text in the 0.15.0 release notes ("HTTP RPC requests should be send to the...") that could be moved to JSON-RPC-interface.md. This could be done here or in a separate PR. I actually remember complaining about lack of API documentation when this feature was first added #10849 (comment), and I guess it still doesn't exist.

This comment has been minimized.

Copy link
@laanwj

laanwj Nov 23, 2018

Member

I generally don't think the option help is the place to put very detailed specifications (just like the release notes are not !), but in this case I kind of like it because it's short and directly illustrates what it does.

@meshcollider

This comment has been minimized.

Copy link
Member

commented Nov 9, 2018

Agree with @promag, IMO this isn't the right place to put such an example, it would be better in some other documentation not in bitcoin-cli help text

@JBaczuk

This comment has been minimized.

Copy link
Contributor Author

commented Nov 9, 2018

I agree, maybe doc/RPC-interface.md is a better solution, the only problem is that many users will not know about the new doc. Perhaps the incentive to dig a little is great enough. I wonder if the doc/RPC-interface.md would be too difficult to maintain, e.g. the manpages are is generated deterministically.

@ryanofsky
Copy link
Contributor

left a comment

utACK 0c69ff6

@@ -51,7 +51,7 @@ static void SetupCliArgs()
gArgs.AddArg("-rpcport=<port>", strprintf("Connect to JSON-RPC on <port> (default: %u, testnet: %u, regtest: %u)", defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort(), regtestBaseParams->RPCPort()), false, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcuser=<user>", "Username for JSON-RPC connections", false, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcwait", "Wait for RPC server to start", false, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcwallet=<walletname>", "Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to bitcoind)", false, OptionsCategory::OPTIONS);
gArgs.AddArg("-rpcwallet=<walletname>", "Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to bitcoind). This changes the RPC endpoint used, e.g. http://127.0.0.1:8332/wallet/<walletname>", false, OptionsCategory::OPTIONS);

This comment has been minimized.

Copy link
@ryanofsky

ryanofsky Nov 12, 2018

Contributor

I disagree with meshcollider and promag, and think this information is useful. Or at least I don't understand how it harms anyone. I hate documentation that just gives me a handwavy gloss about how an option is intended to be used without saying what it actually does.

Of course it would also be good to document wallet endpoints in markdown. There is some text in the 0.15.0 release notes ("HTTP RPC requests should be send to the...") that could be moved to JSON-RPC-interface.md. This could be done here or in a separate PR. I actually remember complaining about lack of API documentation when this feature was first added #10849 (comment), and I guess it still doesn't exist.

@laanwj

This comment has been minimized.

Copy link
Member

commented Nov 23, 2018

utACK 0c69ff6

@laanwj laanwj changed the title clarify rpcwallet flag url change doc: Clarify rpcwallet flag url change Nov 23, 2018

@laanwj laanwj merged commit 0c69ff6 into bitcoin:master Nov 23, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Nov 23, 2018

Merge #14448: doc: Clarify rpcwallet flag url change
0c69ff6 clarify rpcwallet flag url change (Jordan Baczuk)

Pull request description:

  This adds clarification to the bitcoin-cli -rpcwallet flag in the help command. This will benefit users who want to utilize this feature without the cli, for example curl. It isn't readily apparent that this changes the url used in the RPC call.

Tree-SHA512: 6fc759f193f0a918884aab8ba4dc77ed9e89ee3840feeff737a754be758750590f5bd44b40f4810c3b82601e125e62e10360af45cb8e9d95be206ebeb9120ebf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.