diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2017-11-02 00:39:23 +0000 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2017-11-07 19:13:38 +0000 |
commit | b411c2a12ab3896840a4c6334336ddc46afee8bb (patch) | |
tree | 62c712d979f0e420e634c4634e1d57e8ed86f4fe /src/wallet/init.cpp | |
parent | ef8a634358848847e006c43ce621bc17a612fd1f (diff) |
Improve -disablewallet parameter interaction
Diffstat (limited to 'src/wallet/init.cpp')
-rw-r--r-- | src/wallet/init.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp index c984df1df8..6af6552325 100644 --- a/src/wallet/init.cpp +++ b/src/wallet/init.cpp @@ -53,11 +53,16 @@ std::string GetWalletHelpString(bool showDebug) bool WalletParameterInteraction() { - gArgs.SoftSetArg("-wallet", DEFAULT_WALLET_DAT); - const bool is_multiwallet = gArgs.GetArgs("-wallet").size() > 1; + if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) { + for (const std::string& wallet : gArgs.GetArgs("-wallet")) { + LogPrintf("%s: parameter interaction: -disablewallet -> ignoring -wallet=%s\n", __func__, wallet); + } - if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) return true; + } + + gArgs.SoftSetArg("-wallet", DEFAULT_WALLET_DAT); + const bool is_multiwallet = gArgs.GetArgs("-wallet").size() > 1; if (gArgs.GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && gArgs.SoftSetBoolArg("-walletbroadcast", false)) { LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__); |