[wallet] fix zapwallettxes interaction with persistent mempool

zapwallettxes previously did not interact well with persistent mempool.
zapwallettxes would cause wallet transactions to be zapped, but they
would then be reloaded from the mempool on startup. This commit softsets
persistmempool to false if zapwallettxes is enabled so transactions are
actually zapped.
This commit is contained in:
John Newbery
2017-05-03 13:36:13 -04:00
parent ff7365e780
commit e7a2181b49
2 changed files with 42 additions and 45 deletions

View File

@@ -4043,6 +4043,11 @@ bool CWallet::ParameterInteraction()
}
}
// -zapwallettx implies dropping the mempool on startup
if (GetBoolArg("-zapwallettxes", false) && SoftSetBoolArg("-persistmempool", false)) {
LogPrintf("%s: parameter interaction: -zapwallettxes=<mode> -> setting -persistmempool=0\n", __func__);
}
// -zapwallettx implies a rescan
if (GetBoolArg("-zapwallettxes", false)) {
if (is_multiwallet) {