diff options
author | John Newbery <john@johnnewbery.com> | 2017-05-03 13:36:13 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2017-07-15 15:15:25 -0400 |
commit | e7a2181b49774f2cc29839ebbdc206bcdb715a7f (patch) | |
tree | 08933e8a3d37a1f35ee45ccc8313540aa8d16c0f /src | |
parent | ff7365e780624a1ef66c12a6d7b61448a3f9294c (diff) |
[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.
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 07b7f58a64..4366428f5c 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -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) { |