mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 13:32:47 +01:00
RPC: disable privatesend
rpc on masternodes completely
This commit is contained in:
parent
f486652476
commit
564b3d68fe
@ -46,15 +46,15 @@ UniValue privatesend(const JSONRPCRequest& request)
|
|||||||
" reset - Reset mixing\n"
|
" 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") {
|
if(request.params[0].get_str() == "start") {
|
||||||
{
|
{
|
||||||
LOCK(pwalletMain->cs_wallet);
|
LOCK(pwalletMain->cs_wallet);
|
||||||
EnsureWalletIsUnlocked();
|
EnsureWalletIsUnlocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fMasternodeMode)
|
|
||||||
return "Mixing is not supported from masternodes";
|
|
||||||
|
|
||||||
privateSendClient.fEnablePrivateSend = true;
|
privateSendClient.fEnablePrivateSend = true;
|
||||||
bool result = privateSendClient.DoAutomaticDenominating(*g_connman);
|
bool result = privateSendClient.DoAutomaticDenominating(*g_connman);
|
||||||
return "Mixing " + (result ? "started successfully" : ("start failed: " + privateSendClient.GetStatus() + ", will retry"));
|
return "Mixing " + (result ? "started successfully" : ("start failed: " + privateSendClient.GetStatus() + ", will retry"));
|
||||||
|
Loading…
Reference in New Issue
Block a user