diff options
Diffstat (limited to 'src/rpc/server.cpp')
-rw-r--r-- | src/rpc/server.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index 77076e0295..33fa1437e2 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -497,6 +497,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 "> bitcoin-cli " + methodname + " " + args + "\n"; |