Browse Source

Disable option to allow multiple async rpc workers.

pull/145/head
Simon 8 years ago
parent
commit
008fccfa48
  1. 4
      src/init.cpp
  2. 6
      src/rpcserver.cpp

4
src/init.cpp

@ -424,7 +424,9 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-rpcallowip=<ip>", _("Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times"));
strUsage += HelpMessageOpt("-rpcthreads=<n>", strprintf(_("Set the number of threads to service RPC calls (default: %d)"), 4));
strUsage += HelpMessageOpt("-rpckeepalive", strprintf(_("RPC support for HTTP persistent connections (default: %d)"), 1));
strUsage += HelpMessageOpt("-rpcasyncthreads=<n>", strprintf(_("Set the number of threads to service Async RPC calls (default: %d)"), 1));
// Disabled until we can lock notes and also tune performance of libsnark which by default uses multiple threads
//strUsage += HelpMessageOpt("-rpcasyncthreads=<n>", strprintf(_("Set the number of threads to service Async RPC calls (default: %d)"), 1));
strUsage += HelpMessageGroup(_("RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)"));
strUsage += HelpMessageOpt("-rpcssl", _("Use OpenSSL (https) for JSON-RPC connections"));

6
src/rpcserver.cpp

@ -746,8 +746,10 @@ void StartRPCThreads()
fRPCRunning = true;
g_rpcSignals.Started();
// Launch at least one async rpc worker
// Launch one async rpc worker. The ability to launch multiple workers is not recommended at present and thus the option is disabled.
async_rpc_queue = std::make_shared<AsyncRPCQueue>();
async_rpc_queue->addWorker();
/*
int n = GetArg("-rpcasyncthreads", 1);
if (n<1) {
LogPrintf("ERROR: Invalid value %d for -rpcasyncthreads. Must be at least 1.\n", n);
@ -758,7 +760,7 @@ void StartRPCThreads()
}
for (int i = 0; i < n; i++)
async_rpc_queue->addWorker();
*/
}
void StartDummyRPCThread()

Loading…
Cancel
Save