mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Merge branch 'develop' into feature
This commit is contained in:
@@ -158,6 +158,8 @@ bool Base58::decode (const std::string& str, std::vector<unsigned char>& vchRet)
|
||||
|
||||
bool Base58::decodeWithCheck (const char* psz, std::vector<unsigned char>& vchRet, const char* pAlphabet)
|
||||
{
|
||||
if (pAlphabet == NULL)
|
||||
pAlphabet = s_currentAlphabet;
|
||||
if (!decode (psz, vchRet, pAlphabet))
|
||||
return false;
|
||||
if (vchRet.size() < 4)
|
||||
|
||||
@@ -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