Don't use getAccountState as a quick way to check if an account

exists in a ledger. It's much heavier than needed.
This commit is contained in:
JoelKatz
2013-05-30 11:48:13 -07:00
parent 468588e3a0
commit aef0a84e07
3 changed files with 8 additions and 6 deletions

View File

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