Skip to content

Commit bd9aebf

Browse files
committed
Introduce a hidden category
1 parent 0dd06b2 commit bd9aebf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/rpcserver.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ string CRPCTable::help(string strCommand) const
160160
// We already filter duplicates, but these deprecated screw up the sort order
161161
if (strMethod.find("label") != string::npos)
162162
continue;
163-
if (strCommand != "" && strMethod != strCommand)
163+
if ((strCommand != "" || pcmd->category == "hidden") && strMethod != strCommand)
164164
continue;
165165
#ifdef ENABLE_WALLET
166166
if (pcmd->reqWallet && !pwalletMain)
@@ -270,8 +270,6 @@ static const CRPCCommand vRPCCommands[] =
270270
{ "blockchain", "gettxout", &gettxout, true, false, false },
271271
{ "blockchain", "gettxoutsetinfo", &gettxoutsetinfo, true, false, false },
272272
{ "blockchain", "verifychain", &verifychain, true, false, false },
273-
{ "blockchain", "invalidateblock", &invalidateblock, true, true, false },
274-
{ "blockchain", "reconsiderblock", &reconsiderblock, true, true, false },
275273

276274
/* Mining */
277275
{ "mining", "getblocktemplate", &getblocktemplate, true, false, false },
@@ -302,6 +300,10 @@ static const CRPCCommand vRPCCommands[] =
302300
{ "util", "estimatefee", &estimatefee, true, true, false },
303301
{ "util", "estimatepriority", &estimatepriority, true, true, false },
304302

303+
/* Not shown in help */
304+
{ "hidden", "invalidateblock", &invalidateblock, true, true, false },
305+
{ "hidden", "reconsiderblock", &reconsiderblock, true, true, false },
306+
305307
#ifdef ENABLE_WALLET
306308
/* Wallet */
307309
{ "wallet", "addmultisigaddress", &addmultisigaddress, true, false, true },

0 commit comments

Comments
 (0)