Skip to content

Commit

Permalink
[Refactoring] Move sysperms + enabled wallet check in wallet.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed May 7, 2021
1 parent d8d723b commit 6ab142b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 1 addition & 6 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -871,12 +871,7 @@ bool AppInitBasicSetup()
return UIError("Error: Initializing networking failed");

#ifndef WIN32
if (gArgs.GetBoolArg("-sysperms", false)) {
#ifdef ENABLE_WALLET
if (!gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET))
return UIError("Error: -sysperms is not allowed in combination with enabled wallet functionality");
#endif
} else {
if (!gArgs.GetBoolArg("-sysperms", false)) {
umask(077);
}

Expand Down
4 changes: 4 additions & 0 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,10 @@ bool CWallet::ParameterInteraction()
return true;
}

if (gArgs.GetBoolArg("-sysperms", false)) {
return UIError("-sysperms is not allowed in combination with enabled wallet functionality");
}

if (gArgs.IsArgSet("-mintxfee")) {
CAmount n = 0;
if (ParseMoney(gArgs.GetArg("-mintxfee", ""), n) && n > 0)
Expand Down

0 comments on commit 6ab142b

Please sign in to comment.