From fac3ecaf69d6f2d655e71644c98364206f7e2ddc Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 13 Feb 2026 15:41:51 +0100 Subject: [PATCH] rpc: Properly parse -rpcworkqueue/-rpcthreads Also, remove the trailing unnecessary \n from the two logs. --- src/httpserver.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 671e119642f..7af0896c0bf 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -410,8 +410,8 @@ bool InitHTTPServer(const util::SignalInterrupt& interrupt) } LogDebug(BCLog::HTTP, "Initialized HTTP server\n"); - g_max_queue_depth = std::max((long)gArgs.GetIntArg("-rpcworkqueue", DEFAULT_HTTP_WORKQUEUE), 1L); - LogDebug(BCLog::HTTP, "set work queue of depth %d\n", g_max_queue_depth); + g_max_queue_depth = std::max(gArgs.GetArg("-rpcworkqueue", DEFAULT_HTTP_WORKQUEUE), 1); + LogDebug(BCLog::HTTP, "set work queue of depth %d", g_max_queue_depth); // transfer ownership to eventBase/HTTP via .release() eventBase = base_ctr.release(); @@ -431,8 +431,8 @@ static std::thread g_thread_http; void StartHTTPServer() { - int rpcThreads = std::max((long)gArgs.GetIntArg("-rpcthreads", DEFAULT_HTTP_THREADS), 1L); - LogInfo("Starting HTTP server with %d worker threads\n", rpcThreads); + int rpcThreads = std::max(gArgs.GetArg("-rpcthreads", DEFAULT_HTTP_THREADS), 1); + LogInfo("Starting HTTP server with %d worker threads", rpcThreads); g_threadpool_http.Start(rpcThreads); g_thread_http = std::thread(ThreadHTTP, eventBase); }