Skip to content

Commit

Permalink
[wallet] Introduce DEFAULT_DISABLE_WALLET
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoFalke authored and random-zebra committed May 7, 2021
1 parent d098e5b commit d8d723b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ bool AppInitBasicSetup()
#ifndef WIN32
if (gArgs.GetBoolArg("-sysperms", false)) {
#ifdef ENABLE_WALLET
if (!gArgs.GetBoolArg("-disablewallet", false))
if (!gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET))
return UIError("Error: -sysperms is not allowed in combination with enabled wallet functionality");
#endif
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/qt/pivx/pivxgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ PIVXGUI::PIVXGUI(const NetworkStyle* networkStyle, QWidget* parent) :

#ifdef ENABLE_WALLET
/* if compiled with wallet support, -disablewallet can still disable the wallet */
enableWallet = !gArgs.GetBoolArg("-disablewallet", false);
enableWallet = !gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET);
#else
enableWallet = false;
#endif // ENABLE_WALLET
Expand Down
6 changes: 3 additions & 3 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ void CWallet::SyncMetaData(std::pair<typename TxSpendMap<T>::iterator, typename

bool CWallet::ParameterInteraction()
{
if (gArgs.GetBoolArg("-disablewallet", false)) {
if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) {
return true;
}

Expand Down Expand Up @@ -2067,7 +2067,7 @@ std::set<uint256> CWalletTx::GetConflicts() const

bool CWallet::Verify()
{
if (gArgs.GetBoolArg("-disablewallet", false)) {
if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) {
return true;
}

Expand Down Expand Up @@ -4090,7 +4090,7 @@ std::string CWallet::GetWalletHelpString(bool showDebug)
strUsage += HelpMessageOpt("-backuppath=<dir|file>", _("Specify custom backup path to add a copy of any wallet backup. If set as dir, every backup generates a timestamped file. If set as file, will rewrite to that file every backup."));
strUsage += HelpMessageOpt("-createwalletbackups=<n>", strprintf(_("Number of automatic wallet backups (default: %d)"), DEFAULT_CREATEWALLETBACKUPS));
strUsage += HelpMessageOpt("-custombackupthreshold=<n>", strprintf(_("Number of custom location backups to retain (default: %d)"), DEFAULT_CUSTOMBACKUPTHRESHOLD));
strUsage += HelpMessageOpt("-disablewallet", _("Do not load the wallet and disable wallet RPC calls"));
strUsage += HelpMessageOpt("-disablewallet", strprintf(_("Do not load the wallet and disable wallet RPC calls (default: %u)"), DEFAULT_DISABLE_WALLET));
strUsage += HelpMessageOpt("-keypool=<n>", strprintf(_("Set key pool size to <n> (default: %u)"), DEFAULT_KEYPOOL_SIZE));
strUsage += HelpMessageOpt("-legacywallet", _("On first run, create a legacy wallet instead of a HD wallet"));
strUsage += HelpMessageOpt("-maxtxfee=<amt>", strprintf(_("Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)"), FormatMoney(maxTxFee)));
Expand Down

0 comments on commit d8d723b

Please sign in to comment.