aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2018-04-19 11:07:54 -0400
committerfanquake <fanquake@gmail.com>2018-05-17 10:50:28 +0800
commit4c14e7b67cd411b501e4a77385389da0afc9dd16 (patch)
tree4d5508aa98739e425bab0cc6f9270fa01ec7c317 /src
parent4087dd08e7df5beedc335f4518b64eeab6a382c1 (diff)
[wallet] Fix zapwallettxes/multiwallet interaction.
-zapwallettxes should be disallowed when starting bitcoin in multiwallet mode. GitHub-Pull: #13030 Rebased-From: 3476e3c
Diffstat (limited to 'src')
-rw-r--r--src/wallet/init.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp
index ace95204b8..6e0b11cd9a 100644
--- a/src/wallet/init.cpp
+++ b/src/wallet/init.cpp
@@ -82,19 +82,19 @@ bool WalletParameterInteraction()
}
}
- int zapwallettxes = gArgs.GetArg("-zapwallettxes", 0);
+ bool zapwallettxes = gArgs.GetBoolArg("-zapwallettxes", false);
// -zapwallettxes implies dropping the mempool on startup
- if (zapwallettxes != 0 && gArgs.SoftSetBoolArg("-persistmempool", false)) {
- LogPrintf("%s: parameter interaction: -zapwallettxes=%s -> setting -persistmempool=0\n", __func__, zapwallettxes);
+ if (zapwallettxes && gArgs.SoftSetBoolArg("-persistmempool", false)) {
+ LogPrintf("%s: parameter interaction: -zapwallettxes enabled -> setting -persistmempool=0\n", __func__);
}
// -zapwallettxes implies a rescan
- if (zapwallettxes != 0) {
+ if (zapwallettxes) {
if (is_multiwallet) {
return InitError(strprintf("%s is only allowed with a single wallet file", "-zapwallettxes"));
}
if (gArgs.SoftSetBoolArg("-rescan", true)) {
- LogPrintf("%s: parameter interaction: -zapwallettxes=%s -> setting -rescan=1\n", __func__, zapwallettxes);
+ LogPrintf("%s: parameter interaction: -zapwallettxes enabled -> setting -rescan=1\n", __func__);
}
}