Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/server.cpp
Show First 20 Lines • Show All 222 Lines • ▼ Show 20 Lines | std::string CRPCTable::help(Config &config, const std::string &strCommand, | ||||
JSONRPCRequest jreq(helpreq); | JSONRPCRequest jreq(helpreq); | ||||
jreq.fHelp = true; | jreq.fHelp = true; | ||||
jreq.params = UniValue(); | jreq.params = UniValue(); | ||||
for (const std::pair<std::string, const ContextFreeRPCCommand *> &command : | for (const std::pair<std::string, const ContextFreeRPCCommand *> &command : | ||||
vCommands) { | vCommands) { | ||||
const ContextFreeRPCCommand *pcmd = command.second; | const ContextFreeRPCCommand *pcmd = command.second; | ||||
std::string strMethod = pcmd->name; | std::string strMethod = pcmd->name; | ||||
// We already filter duplicates, but these deprecated screw up the sort | |||||
// order | |||||
if (strMethod.find("label") != std::string::npos) { | |||||
continue; | |||||
} | |||||
if ((strCommand != "" || pcmd->category == "hidden") && | if ((strCommand != "" || pcmd->category == "hidden") && | ||||
strMethod != strCommand) { | strMethod != strCommand) { | ||||
continue; | continue; | ||||
} | } | ||||
jreq.strMethod = strMethod; | jreq.strMethod = strMethod; | ||||
try { | try { | ||||
if (setDone.insert(pcmd).second) { | if (setDone.insert(pcmd).second) { | ||||
▲ Show 20 Lines • Show All 351 Lines • Show Last 20 Lines |