From a0f964c851fd5fbf0ae6c78f7a7f1b288766deae Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 13 May 2013 06:52:24 -0700 Subject: [PATCH] Don't hold the master lock while doing proofs of work. --- src/cpp/ripple/RPCHandler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cpp/ripple/RPCHandler.cpp b/src/cpp/ripple/RPCHandler.cpp index 02af628873..4f46ba3cbf 100644 --- a/src/cpp/ripple/RPCHandler.cpp +++ b/src/cpp/ripple/RPCHandler.cpp @@ -885,6 +885,7 @@ Json::Value RPCHandler::doProfile(Json::Value jvRequest, int& cost, ScopedLock& // } Json::Value RPCHandler::doProofCreate(Json::Value jvRequest, int& cost, ScopedLock& MasterLockHolder) { + MasterLockHolder.unlock(); // XXX: Add ability to create proof with arbitrary time Json::Value jvResult(Json::objectValue); @@ -926,6 +927,8 @@ Json::Value RPCHandler::doProofCreate(Json::Value jvRequest, int& cost, ScopedLo // } Json::Value RPCHandler::doProofSolve(Json::Value jvRequest, int& cost, ScopedLock& MasterLockHolder) { + MasterLockHolder.unlock(); + Json::Value jvResult; if (!jvRequest.isMember("token")) @@ -954,6 +957,7 @@ Json::Value RPCHandler::doProofSolve(Json::Value jvRequest, int& cost, ScopedLoc // } Json::Value RPCHandler::doProofVerify(Json::Value jvRequest, int& cost, ScopedLock& MasterLockHolder) { + MasterLockHolder.unlock(); // XXX Add ability to check proof against arbitrary time Json::Value jvResult;