aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-05-03 13:36:13 -0400
committerJohn Newbery <john@johnnewbery.com>2017-07-15 15:15:25 -0400
commite7a2181b49774f2cc29839ebbdc206bcdb715a7f (patch)
tree08933e8a3d37a1f35ee45ccc8313540aa8d16c0f /src/wallet/wallet.cpp
parentff7365e780624a1ef66c12a6d7b61448a3f9294c (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/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp5
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) {