This commit is contained in:
jed
2012-08-20 17:01:53 -07:00
parent 62eff7ecf4
commit 6694372af7
4 changed files with 6 additions and 6 deletions

View File

@@ -20,8 +20,8 @@ AccountState::AccountState(const NewcoinAddress& naAccountID) : mAccountID(naAcc
mValid = true;
}
AccountState::AccountState(const SerializedLedgerEntry::pointer& ledgerEntry) :
mLedgerEntry(ledgerEntry), mValid(false)
AccountState::AccountState(const SerializedLedgerEntry::pointer& ledgerEntry,const NewcoinAddress& naAccountID) :
mLedgerEntry(ledgerEntry), mValid(false), mAccountID(naAccountID)
{
if (!mLedgerEntry) return;
if (mLedgerEntry->getType() != ltACCOUNT_ROOT) return;
@@ -44,7 +44,7 @@ void AccountState::addJson(Json::Value& val)
if (mValid)
{
val["AccountID"] = mAccountID.humanAccountID();
val["Account"] = mAccountID.humanAccountID();
if (mLedgerEntry->getIFieldPresent(sfEmailHash))
val["UrlGravatar"] = createGravatarUrl(mLedgerEntry->getIFieldH128(sfEmailHash));

View File

@@ -29,7 +29,7 @@ private:
public:
AccountState(const NewcoinAddress& naAccountID); // For new accounts
AccountState(const SerializedLedgerEntry::pointer& ledgerEntry); // For accounts in a ledger
AccountState(const SerializedLedgerEntry::pointer& ledgerEntry,const NewcoinAddress& naAccountI); // For accounts in a ledger
bool bHaveAuthorizedKey()
{

View File

@@ -178,7 +178,7 @@ AccountState::pointer Ledger::getAccountState(const NewcoinAddress& accountID)
SerializedLedgerEntry::pointer sle =
boost::make_shared<SerializedLedgerEntry>(item->peekSerializer(), item->getTag());
if (sle->getType() != ltACCOUNT_ROOT) return AccountState::pointer();
return boost::make_shared<AccountState>(sle);
return boost::make_shared<AccountState>(sle,accountID);
}
NicknameState::pointer Ledger::getNicknameState(const uint256& uNickname)

View File

@@ -169,7 +169,7 @@ bool parseQuality(const std::string& strSource, uint32& uQuality)
float fQuality = lexical_cast_s<float>(strSource);
if (fQuality)
uQuality = QUALITY_ONE*fQuality;
uQuality = (uint32)(QUALITY_ONE*fQuality);
}
return !!uQuality;