mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 22:45:52 +00:00
Merge branch 'develop' into feature
This commit is contained in:
@@ -190,6 +190,11 @@ void Ledger::setAccepted()
|
||||
setImmutable();
|
||||
}
|
||||
|
||||
bool Ledger::hasAccount(const RippleAddress& accountID)
|
||||
{
|
||||
return mAccountStateMap->hasItem(Ledger::getAccountRootIndex(accountID));
|
||||
}
|
||||
|
||||
AccountState::pointer Ledger::getAccountState(const RippleAddress& accountID)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
|
||||
@@ -183,6 +183,7 @@ public:
|
||||
TransactionMetaSet::pointer& txMeta);
|
||||
|
||||
// high-level functions
|
||||
bool hasAccount(const RippleAddress& acctID);
|
||||
AccountState::pointer getAccountState(const RippleAddress& acctID);
|
||||
LedgerStateParms writeBack(LedgerStateParms parms, SLE::ref);
|
||||
SLE::pointer getAccountRoot(const uint160& accountID);
|
||||
|
||||
@@ -1062,9 +1062,7 @@ Json::Value RPCHandler::doAccountLines(Json::Value jvRequest, int& cost, ScopedL
|
||||
return jvResult;
|
||||
}
|
||||
|
||||
AccountState::pointer as = mNetOps->getAccountState(lpLedger, raAccount);
|
||||
|
||||
if (as)
|
||||
if (lpLedger->hasAccount(raAccount))
|
||||
{
|
||||
jvResult["account"] = raAccount.humanAccountID();
|
||||
|
||||
@@ -1140,9 +1138,7 @@ Json::Value RPCHandler::doAccountOffers(Json::Value jvRequest, int& cost, Scoped
|
||||
if (bIndex)
|
||||
jvResult["account_index"] = iIndex;
|
||||
|
||||
AccountState::pointer as = mNetOps->getAccountState(lpLedger, raAccount);
|
||||
|
||||
if (as)
|
||||
if (lpLedger->hasAccount(raAccount))
|
||||
{
|
||||
Json::Value& jsonLines = (jvResult["offers"] = Json::arrayValue);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user