diff --git a/src/httprpc.h b/src/httprpc.h --- a/src/httprpc.h +++ b/src/httprpc.h @@ -50,7 +50,7 @@ * Start HTTP REST subsystem. * Precondition; HTTP and RPC has been started. */ -bool StartREST(); +void StartREST(); /** Interrupt RPC REST subsystem */ void InterruptREST(); diff --git a/src/init.cpp b/src/init.cpp --- a/src/init.cpp +++ b/src/init.cpp @@ -1223,8 +1223,8 @@ if (!StartHTTPRPC(config, httpRPCRequestProcessor)) { return false; } - if (gArgs.GetBoolArg("-rest", DEFAULT_REST_ENABLE) && !StartREST()) { - return false; + if (gArgs.GetBoolArg("-rest", DEFAULT_REST_ENABLE)) { + StartREST(); } StartHTTPServer(); diff --git a/src/rest.cpp b/src/rest.cpp --- a/src/rest.cpp +++ b/src/rest.cpp @@ -670,13 +670,11 @@ {"/rest/getutxos", rest_getutxos}, }; -bool StartREST() { +void StartREST() { for (size_t i = 0; i < ARRAYLEN(uri_prefixes); i++) { RegisterHTTPHandler(uri_prefixes[i].prefix, false, uri_prefixes[i].handler); } - - return true; } void InterruptREST() {}