Changeset View
Changeset View
Standalone View
Standalone View
src/httprpc.cpp
Show First 20 Lines • Show All 387 Lines • ▼ Show 20 Lines | const std::function<bool(Config &, HTTPRequest *, const std::string &)> | ||||
std::bind(&HTTPRPCRequestProcessor::DelegateHTTPRequest, | std::bind(&HTTPRPCRequestProcessor::DelegateHTTPRequest, | ||||
&httpRPCRequestProcessor, std::placeholders::_2); | &httpRPCRequestProcessor, std::placeholders::_2); | ||||
RegisterHTTPHandler("/", true, rpcFunction); | RegisterHTTPHandler("/", true, rpcFunction); | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
// ifdef can be removed once we switch to better endpoint support and API | // ifdef can be removed once we switch to better endpoint support and API | ||||
// versioning | // versioning | ||||
RegisterHTTPHandler("/wallet/", false, rpcFunction); | RegisterHTTPHandler("/wallet/", false, rpcFunction); | ||||
#endif | #endif | ||||
assert(EventBase()); | struct event_base *eventBase = EventBase(); | ||||
httpRPCTimerInterface = | assert(eventBase); | ||||
std::make_unique<HTTPRPCTimerInterface>(EventBase()); | httpRPCTimerInterface = std::make_unique<HTTPRPCTimerInterface>(eventBase); | ||||
RPCSetTimerInterface(httpRPCTimerInterface.get()); | RPCSetTimerInterface(httpRPCTimerInterface.get()); | ||||
return true; | return true; | ||||
} | } | ||||
void InterruptHTTPRPC() { | void InterruptHTTPRPC() { | ||||
LogPrint(BCLog::RPC, "Interrupting HTTP RPC server\n"); | LogPrint(BCLog::RPC, "Interrupting HTTP RPC server\n"); | ||||
} | } | ||||
Show All 11 Lines |