Add autocomplete to bitcoin-qt's console window.
Removed externs Added listCommands() to CRPCTable Move autocomplete init to RPCConsole::setClientModel() Zcash: Only the CRPCTable::listCommands() function.
This commit is contained in:
parent
877212414a
commit
5a82dd0817
|
@ -496,6 +496,17 @@ UniValue CRPCTable::execute(const std::string &strMethod, const UniValue ¶ms
|
|||
g_rpcSignals.PostCommand(*pcmd);
|
||||
}
|
||||
|
||||
std::vector<std::string> CRPCTable::listCommands() const
|
||||
{
|
||||
std::vector<std::string> commandList;
|
||||
typedef std::map<std::string, const CRPCCommand*> commandMap;
|
||||
|
||||
std::transform( mapCommands.begin(), mapCommands.end(),
|
||||
std::back_inserter(commandList),
|
||||
boost::bind(&commandMap::value_type::first,_1) );
|
||||
return commandList;
|
||||
}
|
||||
|
||||
std::string HelpExampleCli(const std::string& methodname, const std::string& args)
|
||||
{
|
||||
return "> zcash-cli " + methodname + " " + args + "\n";
|
||||
|
|
|
@ -147,6 +147,12 @@ public:
|
|||
*/
|
||||
UniValue execute(const std::string &method, const UniValue ¶ms) const;
|
||||
|
||||
/**
|
||||
* Returns a list of registered commands
|
||||
* @returns List of registered commands.
|
||||
*/
|
||||
std::vector<std::string> listCommands() const;
|
||||
|
||||
|
||||
/**
|
||||
* Appends a CRPCCommand to the dispatch table.
|
||||
|
|
Loading…
Reference in New Issue