HomePhabricator

[backport#11594] Improve -disablewallet parameter interaction

Description

[backport#11594] Improve -disablewallet parameter interaction

Summary:
7963335 Fix -disablewallet default value (João Barbosa)
b411c2a Improve -disablewallet parameter interaction (João Barbosa)

Pull request description:

The first commit logs a message for each configured wallet if `-disablewallet` is set:
```
bitcoind -printtoconsole -regtest -disablewallet -wallet=foo -wallet=bar
...
WalletParameterInteraction: parameter interaction: -disablewallet -> ignoring -wallet=foo
WalletParameterInteraction: parameter interaction: -disablewallet -> ignoring -wallet=bar
```
It also moves up the `-disablewallet` check which avoids the unnecessary `-wallet` soft set.

The second commit fixes the default value of `-disablewallet`, currently the value is correct, but it should use `DEFAULT_DISABLE_WALLET`.

The third commit can be dropped or squashed, just took the opportunity to fix the coding style there.

Backport of Core PR11594

Test Plan:

ninja all check check-functional
bitcoind -datadir=[testnetdirwithextrawallet] -disablewallet -wallet=testing

wallet is disabled and I see the correct log line for the specified wallet

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8168

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Nov 9 2017, 12:31
majcostaCommitted on Oct 29 2020, 15:46
majcostaPushed on Oct 29 2020, 15:46
Reviewer
Restricted Project
Differential Revision
D8168: [backport#11594] Improve -disablewallet parameter interaction
Parents
rABC21f4914112c4: [backport#11676] contrib/init: Update openrc-run filename
Branches
Unknown
Tags
Unknown