| 338 | } |
| 339 | |
| 340 | bool 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 | |
| 354 | void InterruptHTTPRPC() |
| 355 | { |
no test coverage detected