mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
[REST] give an appropriate response in warmup phase
This commit is contained in:
@@ -188,6 +188,10 @@ bool HTTPReq_REST(AcceptedConnection *conn,
|
||||
bool fRun)
|
||||
{
|
||||
try {
|
||||
std::string statusmessage;
|
||||
if(RPCIsInWarmup(&statusmessage))
|
||||
throw RESTERR(HTTP_SERVICE_UNAVAILABLE, "Service temporarily unavailable: "+statusmessage);
|
||||
|
||||
for (unsigned int i = 0; i < ARRAYLEN(uri_prefixes); i++) {
|
||||
unsigned int plen = strlen(uri_prefixes[i].prefix);
|
||||
if (strURI.substr(0, plen) == uri_prefixes[i].prefix) {
|
||||
|
||||
Reference in New Issue
Block a user