Skip to content

Commit fcac40a

Browse files
authored
RPC: fix wallet lock check in privatesend start (#2102)
1 parent 23ba94b commit fcac40a

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
@@ -53,7 +53,8 @@ UniValue privatesend(const JSONRPCRequest& request)
5353
if(request.params[0].get_str() == "start") {
5454
{
5555
LOCK(pwalletMain->cs_wallet);
56-
EnsureWalletIsUnlocked();
56+
if (pwalletMain->IsLocked(true))
57+
throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Please unlock wallet for mixing with walletpassphrase first.");
5758
}
5859

5960
privateSendClient.fEnablePrivateSend = true;

0 commit comments

Comments
 (0)