Skip to content

Commit b411c2a

Browse files
committed
Improve -disablewallet parameter interaction
1 parent ef8a634 commit b411c2a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/wallet/init.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,16 @@ std::string GetWalletHelpString(bool showDebug)
5353

5454
bool WalletParameterInteraction()
5555
{
56-
gArgs.SoftSetArg("-wallet", DEFAULT_WALLET_DAT);
57-
const bool is_multiwallet = gArgs.GetArgs("-wallet").size() > 1;
56+
if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) {
57+
for (const std::string& wallet : gArgs.GetArgs("-wallet")) {
58+
LogPrintf("%s: parameter interaction: -disablewallet -> ignoring -wallet=%s\n", __func__, wallet);
59+
}
5860

59-
if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET))
6061
return true;
62+
}
63+
64+
gArgs.SoftSetArg("-wallet", DEFAULT_WALLET_DAT);
65+
const bool is_multiwallet = gArgs.GetArgs("-wallet").size() > 1;
6166

6267
if (gArgs.GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && gArgs.SoftSetBoolArg("-walletbroadcast", false)) {
6368
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__);

0 commit comments

Comments
 (0)