Skip to content

Commit fa58edb

Browse files
author
MarcoFalke
committed
[wallet] Introduce DEFAULT_DISABLE_WALLET
1 parent fab9107 commit fa58edb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/qt/bitcoingui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n
123123
QString windowTitle = tr(PACKAGE_NAME) + " - ";
124124
#ifdef ENABLE_WALLET
125125
/* if compiled with wallet support, -disablewallet can still disable the wallet */
126-
enableWallet = !GetBoolArg("-disablewallet", false);
126+
enableWallet = !GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET);
127127
#else
128128
enableWallet = false;
129129
#endif // ENABLE_WALLET

src/wallet/wallet.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ void CWallet::Flush(bool shutdown)
414414

415415
bool CWallet::Verify()
416416
{
417-
if (GetBoolArg("-disablewallet", false))
417+
if (GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET))
418418
return true;
419419

420420
LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(0, 0, 0));
@@ -3296,7 +3296,7 @@ std::string CWallet::GetWalletHelpString(bool showDebug)
32963296

32973297
bool CWallet::InitLoadWallet()
32983298
{
3299-
if (GetBoolArg("-disablewallet", false)) {
3299+
if (GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) {
33003300
pwalletMain = NULL;
33013301
LogPrintf("Wallet disabled!\n");
33023302
return true;
@@ -3473,7 +3473,7 @@ bool CWallet::InitLoadWallet()
34733473

34743474
bool CWallet::ParameterInteraction()
34753475
{
3476-
if (GetBoolArg("-disablewallet", false))
3476+
if (GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET))
34773477
return true;
34783478

34793479
if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && SoftSetBoolArg("-walletbroadcast", false)) {

src/wallet/wallet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static const bool DEFAULT_WALLET_RBF = false;
5959
//! Largest (in bytes) free transaction we're willing to create
6060
static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000;
6161
static const bool DEFAULT_WALLETBROADCAST = true;
62-
62+
static const bool DEFAULT_DISABLE_WALLET = false;
6363
//! if set, all keys will be derived by using BIP32
6464
static const bool DEFAULT_USE_HD_WALLET = true;
6565

0 commit comments

Comments
 (0)