Page MenuHomePhabricator

[backport#11594] Improve -disablewallet parameter interaction
ClosedPublic

Authored by majcosta on Oct 29 2020, 04:11.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable