MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / StartHTTPRPC

Function StartHTTPRPC

src/httprpc.cpp:340–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340bool StartHTTPRPC(const std::any& context)
341{
342 LogDebug(BCLog::RPC, "Starting HTTP RPC server\n");
343 if (!InitRPCAuthentication())
344 return false;
345
346 auto handle_rpc = [context](HTTPRequest* req, const std::string&) { return HTTPReq_JSONRPC(context, req); };
347 RegisterHTTPHandler("/", true, handle_rpc);
348 if (g_wallet_init_interface.HasWalletSupport()) {
349 RegisterHTTPHandler("/wallet/", false, handle_rpc);
350 }
351 return true;
352}
353
354void InterruptHTTPRPC()
355{

Callers 1

AppInitServersFunction · 0.85

Calls 4

InitRPCAuthenticationFunction · 0.85
HTTPReq_JSONRPCFunction · 0.85
RegisterHTTPHandlerFunction · 0.85
HasWalletSupportMethod · 0.45

Tested by

no test coverage detected