Skip to content

Commit 50ac6fb

Browse files
committed
Throw exception when trying to invoke start-xxx RPC in deterministic mode
1 parent 5050a92 commit 50ac6fb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/rpc/masternode.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ UniValue masternode_start_alias(const JSONRPCRequest& request)
327327
{
328328
if(request.fHelp || request.params.size() < 2)
329329
masternode_start_alias_help();
330+
if (deterministicMNManager->IsDeterministicMNsSporkActive())
331+
throw JSONRPCError(RPC_MISC_ERROR, "start-alias is not supported when deterministic masternode list is active (DIP3)");
330332

331333
if (!EnsureWalletIsAvailable(request.fHelp))
332334
return NullUniValue;
@@ -427,6 +429,8 @@ UniValue masternode_start_all(const JSONRPCRequest& request)
427429
{
428430
if(request.fHelp)
429431
masternode_start_all_help();
432+
if (deterministicMNManager->IsDeterministicMNsSporkActive())
433+
throw JSONRPCError(RPC_MISC_ERROR, strprintf("start-all is not supported when deterministic masternode list is active (DIP3)"));
430434

431435
if (!EnsureWalletIsAvailable(request.fHelp))
432436
return NullUniValue;

0 commit comments

Comments
 (0)