Skip to content

Commit

Permalink
[logs] fix zapwallettxes startup logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewbery authored and furszy committed Jan 18, 2021
1 parent 006c503 commit d6d0ad9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -909,15 +909,16 @@ void InitParameterInteraction()
LogPrintf("%s : parameter interaction: -salvagewallet=1 -> setting -rescan=1\n", __func__);
}

// -zapwallettx implies dropping the mempool on startup
if (gArgs.GetBoolArg("-zapwallettxes", false) && gArgs.SoftSetBoolArg("-persistmempool", false)) {
LogPrintf("%s: parameter interaction: -zapwallettxes=<mode> -> setting -persistmempool=0\n", __func__);
int zapwallettxes = gArgs.GetArg("-zapwallettxes", 0);
// -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);
}

// -zapwallettx implies a rescan
if (gArgs.GetBoolArg("-zapwallettxes", false)) {
// -zapwallettxes implies a rescan
if (zapwallettxes != 0) {
if (gArgs.SoftSetBoolArg("-rescan", true))
LogPrintf("%s : parameter interaction: -zapwallettxes=<mode> -> setting -rescan=1\n", __func__);
LogPrintf("%s : parameter interaction: -zapwallettxes=%s -> setting -rescan=1\n", __func__, zapwallettxes);
}
}

Expand Down

0 comments on commit d6d0ad9

Please sign in to comment.