Throw exception when trying to invoke start-xxx RPC in deterministic mode

This commit is contained in:
Alexander Block 2018-02-23 13:30:02 +01:00
parent 5050a92053
commit 50ac6fb3aa

View File

@ -327,6 +327,8 @@ UniValue masternode_start_alias(const JSONRPCRequest& request)
{
if(request.fHelp || request.params.size() < 2)
masternode_start_alias_help();
if (deterministicMNManager->IsDeterministicMNsSporkActive())
throw JSONRPCError(RPC_MISC_ERROR, "start-alias is not supported when deterministic masternode list is active (DIP3)");
if (!EnsureWalletIsAvailable(request.fHelp))
return NullUniValue;
@ -427,6 +429,8 @@ UniValue masternode_start_all(const JSONRPCRequest& request)
{
if(request.fHelp)
masternode_start_all_help();
if (deterministicMNManager->IsDeterministicMNsSporkActive())
throw JSONRPCError(RPC_MISC_ERROR, strprintf("start-all is not supported when deterministic masternode list is active (DIP3)"));
if (!EnsureWalletIsAvailable(request.fHelp))
return NullUniValue;