Don't assert(foo()) where foo has side effects

This commit is contained in:
practicalswift
2018-06-26 17:19:31 +02:00
parent 0212187fc6
commit 6ad0328f1c
5 changed files with 14 additions and 8 deletions

View File

@@ -240,8 +240,9 @@ bool StartHTTPRPC()
// ifdef can be removed once we switch to better endpoint support and API versioning
RegisterHTTPHandler("/wallet/", false, HTTPReq_JSONRPC);
#endif
assert(EventBase());
httpRPCTimerInterface = MakeUnique<HTTPRPCTimerInterface>(EventBase());
struct event_base* eventBase = EventBase();
assert(eventBase);
httpRPCTimerInterface = MakeUnique<HTTPRPCTimerInterface>(eventBase);
RPCSetTimerInterface(httpRPCTimerInterface.get());
return true;
}