From fcac40ab4edaf3485381ba64bafc9dea2b2fc43c Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Mon, 11 Jun 2018 13:13:03 +0300 Subject: [PATCH] RPC: fix wallet lock check in `privatesend start` (#2102) --- src/rpc/masternode.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rpc/masternode.cpp b/src/rpc/masternode.cpp index f8c845c20..612fe7ce8 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;