Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/server.cpp
Show First 20 Lines • Show All 212 Lines • ▼ Show 20 Lines | if (jsonRequest.fHelp || jsonRequest.params.size() > 1) { | ||||
} | } | ||||
.ToString()); | .ToString()); | ||||
} | } | ||||
// Event loop will exit after current HTTP requests have been handled, so | // Event loop will exit after current HTTP requests have been handled, so | ||||
// this reply will get back to the client. | // this reply will get back to the client. | ||||
StartShutdown(); | StartShutdown(); | ||||
if (jsonRequest.params[0].isNum()) { | if (jsonRequest.params[0].isNum()) { | ||||
MilliSleep(jsonRequest.params[0].get_int()); | UninterruptibleSleep( | ||||
std::chrono::milliseconds{jsonRequest.params[0].get_int()}); | |||||
} | } | ||||
return "Bitcoin server stopping"; | return "Bitcoin server stopping"; | ||||
} | } | ||||
static UniValue uptime(const Config &config, | static UniValue uptime(const Config &config, | ||||
const JSONRPCRequest &jsonRequest) { | const JSONRPCRequest &jsonRequest) { | ||||
if (jsonRequest.fHelp || jsonRequest.params.size() > 0) { | if (jsonRequest.fHelp || jsonRequest.params.size() > 0) { | ||||
throw std::runtime_error(RPCHelpMan{ | throw std::runtime_error(RPCHelpMan{ | ||||
▲ Show 20 Lines • Show All 307 Lines • Show Last 20 Lines |