Skip to content

Commit 2da54f5

Browse files
committed
Cleanup StartRest()
1 parent f66e1c7 commit 2da54f5

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/httprpc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void StopHTTPRPC();
2323
/** Start HTTP REST subsystem.
2424
* Precondition; HTTP and RPC has been started.
2525
*/
26-
bool StartREST();
26+
void StartREST();
2727
/** Interrupt RPC REST subsystem.
2828
*/
2929
void InterruptREST();

src/init.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,7 @@ static bool AppInitServers()
736736
StartRPC();
737737
if (!StartHTTPRPC())
738738
return false;
739-
if (gArgs.GetBoolArg("-rest", DEFAULT_REST_ENABLE) && !StartREST())
740-
return false;
739+
if (gArgs.GetBoolArg("-rest", DEFAULT_REST_ENABLE)) StartREST();
741740
StartHTTPServer();
742741
return true;
743742
}

src/rest.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,11 +591,10 @@ static const struct {
591591
{"/rest/getutxos", rest_getutxos},
592592
};
593593

594-
bool StartREST()
594+
void StartREST()
595595
{
596596
for (unsigned int i = 0; i < ARRAYLEN(uri_prefixes); i++)
597597
RegisterHTTPHandler(uri_prefixes[i].prefix, false, uri_prefixes[i].handler);
598-
return true;
599598
}
600599

601600
void InterruptREST()

0 commit comments

Comments
 (0)