mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-13 19:37:04 +01:00
options: flip listenonion to false if not listening
If the user has unchecked "Allow incoming connections" in
`Settings->Options...->Network` then `fListen=false` is saved in
`~/.config/Bitcoin/Bitcoin-Qt.conf`. This flips `-listen` to `false`
during startup, but leaves `-listenonion` to `true`.
This flipping of `-listen` is done in `OptionsModel::Init()` after
`InitParameterInteraction()` has been executed which would have flipped
`-listenonion`, should it have seen `-listen` being `false`
(this is a difference between `bitcoind` and `bitcoin-qt`).
Fixes: https://github.com/bitcoin-core/gui/issues/567
Github-Pull: bitcoin-core/gui#568
Rebased-From: 7f90dc26c8
This commit is contained in:
parent
642f2726de
commit
70f2c579b9
1 changed files with 4 additions and 1 deletions
|
@ -151,8 +151,11 @@ void OptionsModel::Init(bool resetSettings)
|
|||
|
||||
if (!settings.contains("fListen"))
|
||||
settings.setValue("fListen", DEFAULT_LISTEN);
|
||||
if (!gArgs.SoftSetBoolArg("-listen", settings.value("fListen").toBool()))
|
||||
if (!gArgs.SoftSetBoolArg("-listen", settings.value("fListen").toBool())) {
|
||||
addOverriddenOption("-listen");
|
||||
} else if (!settings.value("fListen").toBool()) {
|
||||
gArgs.SoftSetBoolArg("-listenonion", false);
|
||||
}
|
||||
|
||||
if (!settings.contains("server")) {
|
||||
settings.setValue("server", false);
|
||||
|
|
Loading…
Add table
Reference in a new issue