Repository navigation
Conversation
The usage synopsis for `wallet config` lists `--rpc-user` and `--rpc-password`, but neither flag exists. The rpc backend takes `--basic-auth <user:password>`, or the path of a cookie file as a positional argument, and the client uses the cookie when one is given. Replace the two nonexistent flags with the real options and note which one takes effect when both are present. Refs: bitcoindevkit#271
Most `wallet config` options have an environment variable counterpart through clap's `env` attribute, but none of the names are documented, so users have to read src/commands.rs to find them. Add a table with each variable, the option it sets and the command or backend that uses it. State that a command line flag takes precedence over its variable, and that the values are saved to `config.toml`, which is what the other wallet commands read. Refs: bitcoindevkit#271
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #387 +/- ##
==========================================
- Coverage 60.00% 59.51% -0.50%
==========================================
Files 25 25
Lines 4736 4552 -184
==========================================
- Hits 2842 2709 -133
+ Misses 1894 1843 -51
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Description
Documentation-only changes for the
wallet configsection of the README, split into two commits. This is the first of two PRs for #271.docs(readme): correct rpc auth options in wallet config usage: the usage synopsis listed--rpc-userand--rpc-password, which the CLI does not accept. It now shows--basic-auth <user:password>and the optional<cookie>file path and notes that the cookie is used instead of the user and password when both are given.docs(readme): document env vars accepted by wallet config: adds a table of the environment variables that clap already reads (SERVER_URL,RPC_BASIC_AUTH,COOKIE, etc.), with the option each one sets and where it applies. It also states that flags take precedence over variables and that the values are saved toconfig.toml.Refs #271.
Notes to the reviewers
README.md.env,shortandlongattributes insrc/commands.rs. The cookie-over-basic-auth statement comes fromsrc/client.rs. Two options share-d: the global--datadirandwallet config --database-type.wallet config: values are saved toconfig.toml, and later commands read that file. This describes the current behavior. Runtime overrides (flag > env var > config file on thewalletsubcommand) are not part of this PR. They will come in a follow-up PR, which will also update this section.Checklists
All Submissions:
cargo fmtandcargo clippybefore committing.