Don't hold the master lock while doing proofs of work.

This commit is contained in:
JoelKatz
2013-05-13 06:52:24 -07:00
parent 30b68f8a9d
commit a0f964c851

View File

@@ -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;