Fix debug rpc (#1897)

This commit is contained in:
UdjinM6 2018-02-06 14:08:58 +03:00 committed by GitHub
parent e0b6988a45
commit 4bc4a7dac7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,16 +124,16 @@ UniValue debug(const JSONRPCRequest& request)
"debug ( 0|1|addrman|alert|bench|coindb|db|lock|rand|rpc|selectcoins|mempool" "debug ( 0|1|addrman|alert|bench|coindb|db|lock|rand|rpc|selectcoins|mempool"
"|mempoolrej|net|proxy|prune|http|libevent|tor|zmq|" "|mempoolrej|net|proxy|prune|http|libevent|tor|zmq|"
"dash|privatesend|instantsend|masternode|spork|keepass|mnpayments|gobject )\n" "dash|privatesend|instantsend|masternode|spork|keepass|mnpayments|gobject )\n"
"Change debug category on the fly. Specify single category or use comma to specify many.\n" "Change debug category on the fly. Specify single category or use '+' to specify many.\n"
"\nExamples:\n" "\nExamples:\n"
+ HelpExampleCli("debug", "dash") + HelpExampleCli("debug", "dash")
+ HelpExampleRpc("debug", "dash,net") + HelpExampleRpc("debug", "dash+net")
); );
std::string strMode = request.params[0].get_str(); std::string strMode = request.params[0].get_str();
std::vector<std::string> newMultiArgs; std::vector<std::string> newMultiArgs;
boost::split(newMultiArgs, strMode, boost::is_any_of(",")); boost::split(newMultiArgs, strMode, boost::is_any_of("+"));
ForceSetMultiArgs("-debug", newMultiArgs); ForceSetMultiArgs("-debug", newMultiArgs);
ForceSetArg("-debug", newMultiArgs[newMultiArgs.size() - 1]); ForceSetArg("-debug", newMultiArgs[newMultiArgs.size() - 1]);