Push down RPC reqWallet flag

This commit is contained in:
Jonas Schnelli
2015-04-12 17:56:44 +02:00
parent 0b9dc9c8f5
commit b9fb692d04
5 changed files with 216 additions and 97 deletions

View File

@@ -242,11 +242,6 @@ void OnRPCStopped()
void OnRPCPreCommand(const CRPCCommand& cmd)
{
#ifdef ENABLE_WALLET
if (cmd.reqWallet && !pwalletMain)
throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Method not found (disabled)");
#endif
// Observe safe mode
string strWarning = GetWarnings("rpc");
if (strWarning != "" && !GetBoolArg("-disablesafemode", false) &&