Skip to content

Commit 6d8b594

Browse files
UdjinM6Yoyae
authored andcommitted
RPC: fix wallet lock check in privatesend start (dashpay#2102)
1 parent c0ad1f6 commit 6d8b594

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rpc/masternode.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ UniValue privatesend(const JSONRPCRequest& request)
5454
if(request.params[0].get_str() == "start") {
5555
{
5656
LOCK(pwalletMain->cs_wallet);
57-
EnsureWalletIsUnlocked();
57+
if (pwalletMain->IsLocked(true))
58+
throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Please unlock wallet for mixing with walletpassphrase first.");
5859
}
5960

6061
privateSendClient.fEnablePrivateSend = true;

0 commit comments

Comments
 (0)