Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/init.cpp
Show First 20 Lines • Show All 168 Lines • ▼ Show 20 Lines | if (gArgs.GetBoolArg("-salvagewallet", false)) { | ||||
// Rewrite just private keys: rescan to find transactions | // Rewrite just private keys: rescan to find transactions | ||||
if (gArgs.SoftSetBoolArg("-rescan", true)) { | if (gArgs.SoftSetBoolArg("-rescan", true)) { | ||||
LogPrintf("%s: parameter interaction: -salvagewallet=1 -> setting " | LogPrintf("%s: parameter interaction: -salvagewallet=1 -> setting " | ||||
"-rescan=1\n", | "-rescan=1\n", | ||||
__func__); | __func__); | ||||
} | } | ||||
} | } | ||||
int zapwallettxes = gArgs.GetArg("-zapwallettxes", 0); | bool zapwallettxes = gArgs.GetBoolArg("-zapwallettxes", false); | ||||
// -zapwallettxes implies dropping the mempool on startup | // -zapwallettxes implies dropping the mempool on startup | ||||
if (zapwallettxes != 0 && gArgs.SoftSetBoolArg("-persistmempool", false)) { | if (zapwallettxes && gArgs.SoftSetBoolArg("-persistmempool", false)) { | ||||
LogPrintf("%s: parameter interaction: -zapwallettxes=%s -> setting " | LogPrintf("%s: parameter interaction: -zapwallettxes enabled -> " | ||||
"-persistmempool=0\n", | "setting -persistmempool=0\n", | ||||
__func__, zapwallettxes); | __func__); | ||||
} | } | ||||
// -zapwallettxes implies a rescan | // -zapwallettxes implies a rescan | ||||
if (zapwallettxes != 0) { | if (zapwallettxes) { | ||||
if (is_multiwallet) { | if (is_multiwallet) { | ||||
return InitError( | return InitError( | ||||
strprintf("%s is only allowed with a single wallet file", | strprintf("%s is only allowed with a single wallet file", | ||||
"-zapwallettxes")); | "-zapwallettxes")); | ||||
} | } | ||||
if (gArgs.SoftSetBoolArg("-rescan", true)) { | if (gArgs.SoftSetBoolArg("-rescan", true)) { | ||||
LogPrintf("%s: parameter interaction: -zapwallettxes=<mode> -> " | LogPrintf("%s: parameter interaction: -zapwallettxes enabled -> " | ||||
"setting -rescan=1\n", | "setting -rescan=1\n", | ||||
__func__); | __func__); | ||||
} | } | ||||
} | } | ||||
if (is_multiwallet) { | if (is_multiwallet) { | ||||
if (gArgs.GetBoolArg("-upgradewallet", false)) { | if (gArgs.GetBoolArg("-upgradewallet", false)) { | ||||
return InitError( | return InitError( | ||||
▲ Show 20 Lines • Show All 173 Lines • Show Last 20 Lines |