diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-09-21 12:27:47 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-09-21 12:27:56 +0200 |
| commit | 886e8c9b72698d3d0c901328a46e4f655e3c6a3c (patch) | |
| tree | 898fef3dc4f675a22adecca700908be2050cd808 /src/wallet/wallet.cpp | |
| parent | Merge #8769: Trivial: Fix ISO URL, capitalization (diff) | |
| parent | [wallet] Introduce DEFAULT_DISABLE_WALLET (diff) | |
| download | discoin-886e8c9b72698d3d0c901328a46e4f655e3c6a3c.tar.xz discoin-886e8c9b72698d3d0c901328a46e4f655e3c6a3c.zip | |
Merge #8768: init: Get rid of fDisableWallet
fa58edb [wallet] Introduce DEFAULT_DISABLE_WALLET (MarcoFalke)
fab9107 init: Get rid of fDisableWallet (MarcoFalke)
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 7469fd751..abb1ea7e7 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -414,6 +414,9 @@ void CWallet::Flush(bool shutdown) bool CWallet::Verify() { + if (GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) + 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", DEFAULT_DISABLE_WALLET)) { + 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", DEFAULT_DISABLE_WALLET)) + return true; + if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && SoftSetBoolArg("-walletbroadcast", false)) { LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__); } |