RPC: fix wallet lock check in privatesend start (#2102)

This commit is contained in:
UdjinM6 2018-06-11 13:13:03 +03:00 committed by GitHub
parent 23ba94b370
commit fcac40ab4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,8 @@ UniValue privatesend(const JSONRPCRequest& request)
if(request.params[0].get_str() == "start") { if(request.params[0].get_str() == "start") {
{ {
LOCK(pwalletMain->cs_wallet); 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; privateSendClient.fEnablePrivateSend = true;