Skip to content

Commit d8d723b

Browse files
MarcoFalkerandom-zebra
authored andcommitted
[wallet] Introduce DEFAULT_DISABLE_WALLET
1 parent d098e5b commit d8d723b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ bool AppInitBasicSetup()
873873
#ifndef WIN32
874874
if (gArgs.GetBoolArg("-sysperms", false)) {
875875
#ifdef ENABLE_WALLET
876-
if (!gArgs.GetBoolArg("-disablewallet", false))
876+
if (!gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET))
877877
return UIError("Error: -sysperms is not allowed in combination with enabled wallet functionality");
878878
#endif
879879
} else {

src/qt/pivx/pivxgui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ PIVXGUI::PIVXGUI(const NetworkStyle* networkStyle, QWidget* parent) :
5959

6060
#ifdef ENABLE_WALLET
6161
/* if compiled with wallet support, -disablewallet can still disable the wallet */
62-
enableWallet = !gArgs.GetBoolArg("-disablewallet", false);
62+
enableWallet = !gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET);
6363
#else
6464
enableWallet = false;
6565
#endif // ENABLE_WALLET

src/wallet/wallet.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ void CWallet::SyncMetaData(std::pair<typename TxSpendMap<T>::iterator, typename
646646

647647
bool CWallet::ParameterInteraction()
648648
{
649-
if (gArgs.GetBoolArg("-disablewallet", false)) {
649+
if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) {
650650
return true;
651651
}
652652

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

20682068
bool CWallet::Verify()
20692069
{
2070-
if (gArgs.GetBoolArg("-disablewallet", false)) {
2070+
if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) {
20712071
return true;
20722072
}
20732073

@@ -4090,7 +4090,7 @@ std::string CWallet::GetWalletHelpString(bool showDebug)
40904090
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."));
40914091
strUsage += HelpMessageOpt("-createwalletbackups=<n>", strprintf(_("Number of automatic wallet backups (default: %d)"), DEFAULT_CREATEWALLETBACKUPS));
40924092
strUsage += HelpMessageOpt("-custombackupthreshold=<n>", strprintf(_("Number of custom location backups to retain (default: %d)"), DEFAULT_CUSTOMBACKUPTHRESHOLD));
4093-
strUsage += HelpMessageOpt("-disablewallet", _("Do not load the wallet and disable wallet RPC calls"));
4093+
strUsage += HelpMessageOpt("-disablewallet", strprintf(_("Do not load the wallet and disable wallet RPC calls (default: %u)"), DEFAULT_DISABLE_WALLET));
40944094
strUsage += HelpMessageOpt("-keypool=<n>", strprintf(_("Set key pool size to <n> (default: %u)"), DEFAULT_KEYPOOL_SIZE));
40954095
strUsage += HelpMessageOpt("-legacywallet", _("On first run, create a legacy wallet instead of a HD wallet"));
40964096
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)));

0 commit comments

Comments
 (0)