Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/server.cpp
Show First 20 Lines • Show All 533 Lines • ▼ Show 20 Lines | try { | ||||
} | } | ||||
} catch (const std::exception &e) { | } catch (const std::exception &e) { | ||||
throw JSONRPCError(RPC_MISC_ERROR, e.what()); | throw JSONRPCError(RPC_MISC_ERROR, e.what()); | ||||
} | } | ||||
} | } | ||||
std::vector<std::string> CRPCTable::listCommands() const { | std::vector<std::string> CRPCTable::listCommands() const { | ||||
std::vector<std::string> commandList; | std::vector<std::string> commandList; | ||||
typedef std::map<std::string, const ContextFreeRPCCommand *> commandMap; | for (const auto &i : mapCommands) { | ||||
commandList.emplace_back(i.first); | |||||
std::transform(mapCommands.begin(), mapCommands.end(), | } | ||||
std::back_inserter(commandList), | |||||
boost::bind(&commandMap::value_type::first, _1)); | |||||
return commandList; | return commandList; | ||||
} | } | ||||
std::string HelpExampleCli(const std::string &methodname, | std::string HelpExampleCli(const std::string &methodname, | ||||
const std::string &args) { | const std::string &args) { | ||||
return "> bitcoin-cli " + methodname + " " + args + "\n"; | return "> bitcoin-cli " + methodname + " " + args + "\n"; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |