From 7172946b8d19aa7e1ecbb75bdd6e11cdb24a852e Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 17 Dec 2012 23:56:13 -0800 Subject: [PATCH 1/2] For now, limit to one transaction thread in standalone mode. --- src/cpp/ripple/JobQueue.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cpp/ripple/JobQueue.cpp b/src/cpp/ripple/JobQueue.cpp index 1b236295b3..b029dab5e8 100644 --- a/src/cpp/ripple/JobQueue.cpp +++ b/src/cpp/ripple/JobQueue.cpp @@ -5,6 +5,7 @@ #include #include "Log.h" +#include "Config.h" SETUP_LOG(); @@ -184,7 +185,9 @@ void JobQueue::shutdown() void JobQueue::setThreadCount(int c) { // set the number of thread serving the job queue to precisely this number - if (c == 0) + if (theConfig.RUN_STANDALONE) + c = 1; + else if (c == 0) { c = boost::thread::hardware_concurrency(); if (c < 2) From 0da6d15719a0f2612fb1db9e9ea8f7fe8ec38fff Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Tue, 18 Dec 2012 12:27:25 -0800 Subject: [PATCH 2/2] Allow remotes to do RPC tx. --- src/cpp/ripple/RPCHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpp/ripple/RPCHandler.cpp b/src/cpp/ripple/RPCHandler.cpp index 30844575a9..98a003c4af 100644 --- a/src/cpp/ripple/RPCHandler.cpp +++ b/src/cpp/ripple/RPCHandler.cpp @@ -2319,7 +2319,7 @@ Json::Value RPCHandler::doCommand(Json::Value& jvRequest, int iRole) { "server_info", &RPCHandler::doServerInfo, true, false, optNone }, { "stop", &RPCHandler::doStop, true, false, optNone }, { "transaction_entry", &RPCHandler::doTransactionEntry, false, false, optCurrent }, - { "tx", &RPCHandler::doTx, true, false, optNone }, + { "tx", &RPCHandler::doTx, false, false, optNetwork }, { "tx_history", &RPCHandler::doTxHistory, false, false, optNone }, { "unl_add", &RPCHandler::doUnlAdd, true, false, optNone },