Skip to content

Commit

Permalink
Introduce a hidden category
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa committed Nov 26, 2014
1 parent 0dd06b2 commit bd9aebf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/rpcserver.cpp
Expand Up @@ -160,7 +160,7 @@ string CRPCTable::help(string strCommand) const
// We already filter duplicates, but these deprecated screw up the sort order
if (strMethod.find("label") != string::npos)
continue;
if (strCommand != "" && strMethod != strCommand)
if ((strCommand != "" || pcmd->category == "hidden") && strMethod != strCommand)
continue;
#ifdef ENABLE_WALLET
if (pcmd->reqWallet && !pwalletMain)
Expand Down Expand Up @@ -270,8 +270,6 @@ static const CRPCCommand vRPCCommands[] =
{ "blockchain", "gettxout", &gettxout, true, false, false },
{ "blockchain", "gettxoutsetinfo", &gettxoutsetinfo, true, false, false },
{ "blockchain", "verifychain", &verifychain, true, false, false },
{ "blockchain", "invalidateblock", &invalidateblock, true, true, false },
{ "blockchain", "reconsiderblock", &reconsiderblock, true, true, false },

/* Mining */
{ "mining", "getblocktemplate", &getblocktemplate, true, false, false },
Expand Down Expand Up @@ -302,6 +300,10 @@ static const CRPCCommand vRPCCommands[] =
{ "util", "estimatefee", &estimatefee, true, true, false },
{ "util", "estimatepriority", &estimatepriority, true, true, false },

/* Not shown in help */
{ "hidden", "invalidateblock", &invalidateblock, true, true, false },
{ "hidden", "reconsiderblock", &reconsiderblock, true, true, false },

#ifdef ENABLE_WALLET
/* Wallet */
{ "wallet", "addmultisigaddress", &addmultisigaddress, true, false, true },
Expand Down

0 comments on commit bd9aebf

Please sign in to comment.