Issue Details
- Number
- 29482
- Title
- Inconsistent behavior when overriding bitcoin.conf options from settings.json
- Description
- ### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current behaviour
When `bitcoind` is started with the following configuration files:
`settings.json`:
```
{
"listen": false
}
```
`bitcoin.conf`:
```
listen=1
```
Then it does not listen. This is expected. Options from `settings.json` override ones from `bitcoin.conf`. Both options co-exist in `ArgsManager::m_settings::rw_settings` (listen=0) and `ArgsManager::m_settings::ro_config` (listen=1). Then `ArgsManager::GetBoolArg()` selects the value from `rw_settings`.
### Expected behaviour
What should be the behavior with the following?
`settings.json`:
```
{
"listen": false
}
```
`bitcoin.conf`:
```
listenonion=1
```
I think that for consistency with the above, it should start and not listen. That is, `listenonion=1` from `bitcoin.conf` should be overriden / set to 0. But instead `bitcoind` refuses to start:
```
$ bitcoind
Error: Cannot set -listen=0 together with -listenonion=1
```
### Steps to reproduce
* start `bitcoin-qt`, go to settings -> network and remove the checkbox from "Allow incoming connections"
* shut down
* add `listenonion=1` in `bitcoin.conf` (might as well be done as first step)
* start `bitcoin-qt` - it refuses to start with `Error: Cannot set -listen=0 together with -listenonion=1`
### Relevant log output
_No response_
### How did you obtain Bitcoin Core
Compiled from source
### What version of Bitcoin Core are you using?
master@7143d4388407ab3d12005e55a02d5e8f334e4dc9
### Operating system and version
any
### Machine specifications
_No response_
- URL
-
https://github.com/bitcoin/bitcoin/issue/29482
- Closed by
-
Back to List