aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2016-09-19 16:09:38 +0200
committerMarcoFalke <falke.marco@gmail.com>2016-09-20 17:32:05 +0200
commitfab91070d38aa248a852e04c56dcb73e4022872d (patch)
tree7803823646f7ade7f419853296ab8edb121e8e59 /src/wallet
parent1c24d5f637201b46a621f6e8e0247bc8bdc52f6a (diff)
downloadbitcoin-fab91070d38aa248a852e04c56dcb73e4022872d.tar.xz
init: Get rid of fDisableWallet
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/rpcwallet.cpp3
-rw-r--r--src/wallet/wallet.cpp12
2 files changed, 15 insertions, 0 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 993caad400..3eb7e5d9ba 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -2630,6 +2630,9 @@ static const CRPCCommand commands[] =
void RegisterWalletRPCCommands(CRPCTable &t)
{
+ if (GetBoolArg("-disablewallet", false))
+ return;
+
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)
t.appendCommand(commands[vcidx].name, &commands[vcidx]);
}
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 7469fd7519..27dd4c0a95 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", 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__);
}