Skip to content

Commit 25f0edd

Browse files
committed
Merge #16448: doc: add note on precedence of options in bitcoin.conf
fa2f991 doc: add note on precedence of options in bitcoin.conf (Torkel Rogstad) Pull request description: This was a good addition to the docs, but the PR was closed. So I've cherry-picked the commit and fixed up Russ's comments as well as the linter issue. ACKs for top commit: laanwj: ACK fa2f991 hebasto: ACK fa2f991, I have reviewed the code and it looks OK, I agree it can be merged. jamesob: ACK bitcoin/bitcoin@fa2f991 jonatack: ACK fa2f991 ryanofsky: ACK fa2f991. Only suggested changes since previous review. Tree-SHA512: d8e7bac19e85ad32205652c3c3036766c611cae52e6e3e8af66a2da054659d914dc153d0cf4ace9c0fa7b41f2a8d74d0edd8d83fe7e984b93d70c01a388cf8ec
2 parents 5639d71 + fa2f991 commit 25f0edd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/bitcoin-conf.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@ Network specific options can be:
3030
- placed into sections with headers `[main]` (not `[mainnet]`), `[test]` (not `[testnet]`) or `[regtest]`;
3131
- prefixed with a chain name; e.g., `regtest.maxmempool=100`.
3232

33+
Network specific options take precedence over non-network specific options.
34+
If multiple values for the same option are found with the same precedence, the
35+
first one is generally chosen.
36+
37+
This means that given the following configuration, `regtest.rpcport` is set to `3000`:
38+
39+
```
40+
regtest=1
41+
rpcport=2000
42+
regtest.rpcport=3000
43+
44+
[regtest]
45+
rpcport=4000
46+
```
47+
3348
## Configuration File Path
3449

3550
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.

0 commit comments

Comments
 (0)