mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 14:35:52 +00:00
Don't hold the master lock while doing proofs of work.
This commit is contained in:
@@ -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)
|
Json::Value RPCHandler::doProofCreate(Json::Value jvRequest, int& cost, ScopedLock& MasterLockHolder)
|
||||||
{
|
{
|
||||||
|
MasterLockHolder.unlock();
|
||||||
// XXX: Add ability to create proof with arbitrary time
|
// XXX: Add ability to create proof with arbitrary time
|
||||||
|
|
||||||
Json::Value jvResult(Json::objectValue);
|
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)
|
Json::Value RPCHandler::doProofSolve(Json::Value jvRequest, int& cost, ScopedLock& MasterLockHolder)
|
||||||
{
|
{
|
||||||
|
MasterLockHolder.unlock();
|
||||||
|
|
||||||
Json::Value jvResult;
|
Json::Value jvResult;
|
||||||
|
|
||||||
if (!jvRequest.isMember("token"))
|
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)
|
Json::Value RPCHandler::doProofVerify(Json::Value jvRequest, int& cost, ScopedLock& MasterLockHolder)
|
||||||
{
|
{
|
||||||
|
MasterLockHolder.unlock();
|
||||||
// XXX Add ability to check proof against arbitrary time
|
// XXX Add ability to check proof against arbitrary time
|
||||||
|
|
||||||
Json::Value jvResult;
|
Json::Value jvResult;
|
||||||
|
|||||||
Reference in New Issue
Block a user