diff --git a/src/rpc/masternode.cpp b/src/rpc/masternode.cpp index e12c22eff8..78a4975319 100644 --- a/src/rpc/masternode.cpp +++ b/src/rpc/masternode.cpp @@ -46,15 +46,15 @@ UniValue privatesend(const JSONRPCRequest& request) " reset - Reset mixing\n" ); + if(fMasternodeMode) + throw JSONRPCError(RPC_INTERNAL_ERROR, "Client-side mixing is not supported on masternodes"); + if(request.params[0].get_str() == "start") { { LOCK(pwalletMain->cs_wallet); EnsureWalletIsUnlocked(); } - if(fMasternodeMode) - return "Mixing is not supported from masternodes"; - privateSendClient.fEnablePrivateSend = true; bool result = privateSendClient.DoAutomaticDenominating(*g_connman); return "Mixing " + (result ? "started successfully" : ("start failed: " + privateSendClient.GetStatus() + ", will retry"));