-
Notifications
You must be signed in to change notification settings - Fork 38.1k
doc: add note on precedence of options in bitcoin.conf #16448
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,21 @@ Network specific options can be: | |
| - placed into sections with headers `[main]` (not `[mainnet]`), `[test]` (not `[testnet]`) or `[regtest]`; | ||
| - prefixed with a chain name; e.g., `regtest.maxmempool=100`. | ||
|
|
||
| Network specific options take precedence over non-network specific options. | ||
| If multiple values for the same option are found with the same precedence, the | ||
| first one is generally chosen. | ||
fanquake marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| This means that given the following configuration, `regtest.rpcport` is set to `3000`: | ||
|
|
||
| ``` | ||
| regtest=1 | ||
| rpcport=2000 | ||
| regtest.rpcport=3000 | ||
| [regtest] | ||
| rpcport=4000 | ||
| ``` | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should you decide that comments in the example configuration are a good idea, here is one (entirely optional) version for your consideration: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like adding comments would make this pretty noisy, however will leave this up to if anyone else thinks they should be added. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know this PR has been merged now but I would have liked more comments here as @jonatack suggested. I didn't understand what was going on. I understand there is a trade-off between informing less experienced users and minimizing noise for more experienced users. Perhaps when the minimizing noise option is chosen a Bitcoin StackExchange page can be set up to include those comments. Resources like Jameson Lopp's Bitcoin Core config generator tool are useful too. Though whether you'd want to provide a link to these resources from within a config file or in a comment within the codebase I don't know... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess it's better to make a new PR at this point; replying on a deeply nested comment on a merged PR isn't going to make much of a difference
Would personally prefer to keep it more or less self-contained, external links might change and tend to go stale. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, understood. Thanks |
||
|
|
||
| ## Configuration File Path | ||
|
|
||
| The configuration file is not automatically created; you can create it using your favorite text editor. By default, the configuration file name is `bitcoin.conf` and it is located in the Bitcoin data directory, but both the Bitcoin data directory and the configuration file path may be changed using the `-datadir` and `-conf` command-line options. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.