Remove more Account from AccountStateNode and LedgerEntrySet revision.

This commit is contained in:
Arthur Britto
2012-08-14 17:16:39 -07:00
parent 44053a4afc
commit 872314f933
7 changed files with 26 additions and 25 deletions

View File

@@ -10,12 +10,12 @@
#include "Ledger.h"
#include "Serializer.h"
AccountState::AccountState(const NewcoinAddress& id) : mAccountID(id), mValid(false)
AccountState::AccountState(const NewcoinAddress& id) : mValid(false)
{
if (!id.isValid()) return;
mLedgerEntry = boost::make_shared<SerializedLedgerEntry>(ltACCOUNT_ROOT);
mLedgerEntry->setIndex(Ledger::getAccountRootIndex(id));
mLedgerEntry->setIFieldAccount(sfAccount, id);
mValid = true;
}
@@ -23,9 +23,8 @@ AccountState::AccountState(SerializedLedgerEntry::pointer ledgerEntry) : mLedger
{
if (!mLedgerEntry) return;
if (mLedgerEntry->getType() != ltACCOUNT_ROOT) return;
mAccountID = mLedgerEntry->getIValueFieldAccount(sfAccount);
if (mAccountID.isValid())
mValid = true;
mValid = true;
}
std::string AccountState::createGravatarUrl(uint128 uEmailHash)