init: Get rid of fDisableWallet

This commit is contained in:
MarcoFalke
2016-09-19 16:09:38 +02:00
parent 1c24d5f637
commit fab91070d3
3 changed files with 25 additions and 20 deletions

View File

@@ -414,6 +414,9 @@ void CWallet::Flush(bool shutdown)
bool CWallet::Verify()
{
if (GetBoolArg("-disablewallet", false))
return true;
LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(0, 0, 0));
std::string walletFile = GetArg("-wallet", DEFAULT_WALLET_DAT);
@@ -3293,6 +3296,12 @@ std::string CWallet::GetWalletHelpString(bool showDebug)
bool CWallet::InitLoadWallet()
{
if (GetBoolArg("-disablewallet", false)) {
pwalletMain = NULL;
LogPrintf("Wallet disabled!\n");
return true;
}
std::string walletFile = GetArg("-wallet", DEFAULT_WALLET_DAT);
// needed to restore wallet transaction meta data after -zapwallettxes
@@ -3464,6 +3473,9 @@ bool CWallet::InitLoadWallet()
bool CWallet::ParameterInteraction()
{
if (GetBoolArg("-disablewallet", false))
return true;
if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && SoftSetBoolArg("-walletbroadcast", false)) {
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__);
}