From fda1c17fdb7822a581d0d9365ca7b66391af18b8 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 13 Aug 2018 09:42:48 -0400 Subject: [PATCH] Merge #13938: refactoring: Cleanup StartRest() 2da54f5a66 Cleanup StartRest() (DesWurstes) Pull request description: Tree-SHA512: 7e907315009c0351b7a3347ec13b6727abd12fe722d51cc061cb635ea20f9a550af5f50dc364c4313501b0dfc3696bcfa26a2a5f0170a4b5808624e043085d29 --- src/httprpc.h | 2 +- src/init.cpp | 3 +-- src/rest.cpp | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/httprpc.h b/src/httprpc.h index a89a8f0fbf..06c8ac2026 100644 --- a/src/httprpc.h +++ b/src/httprpc.h @@ -23,7 +23,7 @@ void StopHTTPRPC(); /** 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 index aae65104e5..6f05a3aa4a 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1038,8 +1038,7 @@ static bool AppInitServers() StartRPC(); if (!StartHTTPRPC()) return false; - if (gArgs.GetBoolArg("-rest", DEFAULT_REST_ENABLE) && !StartREST()) - return false; + if (gArgs.GetBoolArg("-rest", DEFAULT_REST_ENABLE)) StartREST(); StartHTTPServer(); return true; } diff --git a/src/rest.cpp b/src/rest.cpp index 37b0281182..5ab46d0071 100644 --- a/src/rest.cpp +++ b/src/rest.cpp @@ -634,11 +634,10 @@ static const struct { {"/rest/blockhashbyheight/", rest_blockhash_by_height}, }; -bool StartREST() +void StartREST() { for (unsigned int i = 0; i < ARRAYLEN(uri_prefixes); i++) RegisterHTTPHandler(uri_prefixes[i].prefix, false, uri_prefixes[i].handler); - return true; } void InterruptREST()