diff --git a/src/rpc/masternode.cpp b/src/rpc/masternode.cpp index f8c845c209..612fe7ce84 100644 --- a/src/rpc/masternode.cpp +++ b/src/rpc/masternode.cpp @@ -53,7 +53,8 @@ UniValue privatesend(const JSONRPCRequest& request) if(request.params[0].get_str() == "start") { { LOCK(pwalletMain->cs_wallet); - EnsureWalletIsUnlocked(); + if (pwalletMain->IsLocked(true)) + throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Please unlock wallet for mixing with walletpassphrase first."); } privateSendClient.fEnablePrivateSend = true;