mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Some optimizations.
This commit is contained in:
@@ -899,6 +899,8 @@ Json::Value RPCHandler::doAccountLines(Json::Value jvRequest)
|
||||
if (!lpLedger)
|
||||
return jvResult;
|
||||
|
||||
ScopedUnlock su(theApp->getMasterLock(), lpLedger->isFixed());
|
||||
|
||||
if (!jvRequest.isMember("account"))
|
||||
return rpcError(rpcINVALID_PARAMS);
|
||||
|
||||
@@ -926,6 +928,7 @@ Json::Value RPCHandler::doAccountLines(Json::Value jvRequest)
|
||||
|
||||
jvResult["account"] = raAccount.humanAccountID();
|
||||
|
||||
|
||||
// XXX This is wrong, we do access the current ledger and do need to worry about changes.
|
||||
// We access a committed ledger and need not worry about changes.
|
||||
|
||||
@@ -977,6 +980,8 @@ Json::Value RPCHandler::doAccountOffers(Json::Value jvRequest)
|
||||
if (!lpLedger)
|
||||
return jvResult;
|
||||
|
||||
ScopedUnlock su(theApp->getMasterLock(), lpLedger->isClosed() || lpLedger->isImmutable());
|
||||
|
||||
if (!jvRequest.isMember("account"))
|
||||
return rpcError(rpcINVALID_PARAMS);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user