aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorJohn Newbery <[email protected]>2017-05-03 13:36:13 -0400
committerJohn Newbery <[email protected]>2017-07-15 15:15:25 -0400
commite7a2181b49774f2cc29839ebbdc206bcdb715a7f (patch)
tree08933e8a3d37a1f35ee45ccc8313540aa8d16c0f /src/wallet/wallet.cpp
parent[tests] fix flake8 warnings in zapwallettxes.py (diff)
downloaddiscoin-e7a2181b49774f2cc29839ebbdc206bcdb715a7f.tar.xz
discoin-e7a2181b49774f2cc29839ebbdc206bcdb715a7f.zip
[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 07b7f58a6..4366428f5 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) {