Skip to content

Commit

Permalink
[RPC] Remove obsolete and ignored 'detach' argument of stop command
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed May 25, 2021
1 parent 7d9af29 commit 9ed1bdd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions doc/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ Low-level RPC changes
- `maximumCount` - a number specifying the minimum number of UTXOs
- `minimumSumAmount` - a number specifying the minimum sum value of all UTXOs

- the `stop` RPC no longer accepts the (already deprecated, ignored, and undocumented) optional boolean argument `detach`.


#### Show wallet's auto-combine settings in getwalletinfo

Expand Down
1 change: 0 additions & 1 deletion src/rpc/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ static const CRPCConvertParam vRPCConvertParams[] = {
{ "signrawtransaction", 2, "privkeys" },
{ "spork", 1, "value" },
{ "startmasternode", 3, "lockwallet" },
{ "stop", 0, "detach" },
{ "submitbudget", 2, "npayments" },
{ "submitbudget", 3, "start" },
{ "submitbudget", 5, "montly_payment" },
Expand Down
5 changes: 2 additions & 3 deletions src/rpc/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ UniValue help(const JSONRPCRequest& jsonRequest)

UniValue stop(const JSONRPCRequest& jsonRequest)
{
// Accept the deprecated and ignored 'detach' boolean argument
if (jsonRequest.fHelp || jsonRequest.params.size() > 1)
if (jsonRequest.fHelp || !jsonRequest.params.empty())
throw std::runtime_error(
"stop\n"
"\nStop PIVX server.");
Expand All @@ -278,7 +277,7 @@ static const CRPCCommand vRPCCommands[] =
// --------------------- ------------------------ ----------------------- ------ ----------
/* Overall control/query calls */
{ "control", "help", &help, true, {"command"} },
{ "control", "stop", &stop, true, {"detach"} },
{ "control", "stop", &stop, true, {} },
};

CRPCTable::CRPCTable()
Expand Down

0 comments on commit 9ed1bdd

Please sign in to comment.