mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 05:23:01 +01:00
Merge #9142: Move -salvagewallet, -zap(wtx) to where they belong
2e44893
Move -salvagewallet, -zap(wtx) to where they belong (Jonas Schnelli)
This commit is contained in:
commit
40022fe5f2
15
src/init.cpp
15
src/init.cpp
@ -751,23 +751,10 @@ void InitParameterInteraction()
|
|||||||
LogPrintf("%s: parameter interaction: -externalip set -> setting -discover=0\n", __func__);
|
LogPrintf("%s: parameter interaction: -externalip set -> setting -discover=0\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetBoolArg("-salvagewallet", false)) {
|
// disable whitelistrelay in blocksonly mode
|
||||||
// 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
|
|
||||||
if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)) {
|
if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)) {
|
||||||
if (SoftSetBoolArg("-whitelistrelay", false))
|
if (SoftSetBoolArg("-whitelistrelay", false))
|
||||||
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -whitelistrelay=0\n", __func__);
|
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.
|
// Forcing relay from whitelisted hosts implies we will accept relays from them in the first place.
|
||||||
|
@ -3568,6 +3568,16 @@ bool CWallet::ParameterInteraction()
|
|||||||
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__);
|
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))
|
if (GetBoolArg("-sysperms", false))
|
||||||
return InitError("-sysperms is not allowed in combination with enabled wallet functionality");
|
return InitError("-sysperms is not allowed in combination with enabled wallet functionality");
|
||||||
if (GetArg("-prune", 0) && GetBoolArg("-rescan", false))
|
if (GetArg("-prune", 0) && GetBoolArg("-rescan", false))
|
||||||
|
Loading…
Reference in New Issue
Block a user