From 50ac6fb3aac196b6e98e911aa1066fa755cccf9f Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Fri, 23 Feb 2018 13:30:02 +0100 Subject: [PATCH] Throw exception when trying to invoke start-xxx RPC in deterministic mode --- src/rpc/masternode.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rpc/masternode.cpp b/src/rpc/masternode.cpp index 0e7fb42663..e006b08739 100644 --- a/src/rpc/masternode.cpp +++ b/src/rpc/masternode.cpp @@ -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;