RPC: fix wallet lock check in privatesend start
(#2102)
This commit is contained in:
parent
23ba94b370
commit
fcac40ab4e
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user