Skip to content

Commit 4c3b538

Browse files
committed
[logs] fix zapwallettxes startup logs
1 parent e7a2181 commit 4c3b538

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/wallet/wallet.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4043,18 +4043,19 @@ bool CWallet::ParameterInteraction()
40434043
}
40444044
}
40454045

4046-
// -zapwallettx implies dropping the mempool on startup
4047-
if (GetBoolArg("-zapwallettxes", false) && SoftSetBoolArg("-persistmempool", false)) {
4048-
LogPrintf("%s: parameter interaction: -zapwallettxes=<mode> -> setting -persistmempool=0\n", __func__);
4046+
int zapwallettxes = GetArg("-zapwallettxes", 0);
4047+
// -zapwallettxes implies dropping the mempool on startup
4048+
if (zapwallettxes != 0 && SoftSetBoolArg("-persistmempool", false)) {
4049+
LogPrintf("%s: parameter interaction: -zapwallettxes=%s -> setting -persistmempool=0\n", __func__, zapwallettxes);
40494050
}
40504051

4051-
// -zapwallettx implies a rescan
4052-
if (GetBoolArg("-zapwallettxes", false)) {
4052+
// -zapwallettxes implies a rescan
4053+
if (zapwallettxes != 0) {
40534054
if (is_multiwallet) {
40544055
return InitError(strprintf("%s is only allowed with a single wallet file", "-zapwallettxes"));
40554056
}
40564057
if (SoftSetBoolArg("-rescan", true)) {
4057-
LogPrintf("%s: parameter interaction: -zapwallettxes=<mode> -> setting -rescan=1\n", __func__);
4058+
LogPrintf("%s: parameter interaction: -zapwallettxes=%s -> setting -rescan=1\n", __func__, zapwallettxes);
40584059
}
40594060
}
40604061

0 commit comments

Comments
 (0)