aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2016-11-12 10:23:57 +0100
committerJonas Schnelli <dev@jonasschnelli.ch>2016-11-12 10:25:34 +0100
commit2e448930815074bbb07214604ed16e905f68558d (patch)
treefe42fc48e85f266c3a3c91c3c36b1f0545f7a394 /src
parentab914a65301bd48f2b6c7a64bf57295ae74f2902 (diff)
Move -salvagewallet, -zap(wtx) to where they belong
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp15
-rw-r--r--src/wallet/wallet.cpp10
2 files changed, 11 insertions, 14 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 31e3efb459..8c93d34268 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -749,23 +749,10 @@ void InitParameterInteraction()
LogPrintf("%s: parameter interaction: -externalip set -> setting -discover=0\n", __func__);
}
- if (GetBoolArg("-salvagewallet", false)) {
- // Rewrite just private keys: rescan to find transactions
- if (SoftSetBoolArg("-rescan", true))
- LogPrintf("%s: parameter interaction: -salvagewallet=1 -> setting -rescan=1\n", __func__);
- }
-
- // -zapwallettx implies a rescan
- if (GetBoolArg("-zapwallettxes", false)) {
- if (SoftSetBoolArg("-rescan", true))
- LogPrintf("%s: parameter interaction: -zapwallettxes=<mode> -> setting -rescan=1\n", __func__);
- }
-
- // disable walletbroadcast and whitelistrelay in blocksonly mode
+ // disable whitelistrelay in blocksonly mode
if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)) {
if (SoftSetBoolArg("-whitelistrelay", false))
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -whitelistrelay=0\n", __func__);
- // walletbroadcast is disabled in CWallet::ParameterInteraction()
}
// Forcing relay from whitelisted hosts implies we will accept relays from them in the first place.
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index c2bac6e330..7537604814 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -3568,6 +3568,16 @@ bool CWallet::ParameterInteraction()
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__);
}
+ if (GetBoolArg("-salvagewallet", false) && SoftSetBoolArg("-rescan", true)) {
+ // Rewrite just private keys: rescan to find transactions
+ LogPrintf("%s: parameter interaction: -salvagewallet=1 -> setting -rescan=1\n", __func__);
+ }
+
+ // -zapwallettx implies a rescan
+ if (GetBoolArg("-zapwallettxes", false) && SoftSetBoolArg("-rescan", true)) {
+ LogPrintf("%s: parameter interaction: -zapwallettxes=<mode> -> setting -rescan=1\n", __func__);
+ }
+
if (GetBoolArg("-sysperms", false))
return InitError("-sysperms is not allowed in combination with enabled wallet functionality");
if (GetArg("-prune", 0) && GetBoolArg("-rescan", false))