mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add Account field back to AccountRoot nodes.
This commit is contained in:
@@ -16,11 +16,12 @@ AccountState::AccountState(const NewcoinAddress& naAccountID) : mAccountID(naAcc
|
||||
|
||||
mLedgerEntry = boost::make_shared<SerializedLedgerEntry>(ltACCOUNT_ROOT);
|
||||
mLedgerEntry->setIndex(Ledger::getAccountRootIndex(naAccountID));
|
||||
mLedgerEntry->setIFieldAccount(sfAccount, naAccountID.getAccountID());
|
||||
|
||||
mValid = true;
|
||||
}
|
||||
|
||||
AccountState::AccountState(const SerializedLedgerEntry::pointer& ledgerEntry,const NewcoinAddress& naAccountID) :
|
||||
AccountState::AccountState(const SerializedLedgerEntry::pointer& ledgerEntry, const NewcoinAddress& naAccountID) :
|
||||
mAccountID(naAccountID), mLedgerEntry(ledgerEntry), mValid(false)
|
||||
{
|
||||
if (!mLedgerEntry)
|
||||
@@ -46,8 +47,6 @@ void AccountState::addJson(Json::Value& val)
|
||||
|
||||
if (mValid)
|
||||
{
|
||||
val["Account"] = mAccountID.humanAccountID();
|
||||
|
||||
if (mLedgerEntry->getIFieldPresent(sfEmailHash))
|
||||
val["UrlGravatar"] = createGravatarUrl(mLedgerEntry->getIFieldH128(sfEmailHash));
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ LedgerEntryFormat LedgerFormats[]=
|
||||
{
|
||||
{ "AccountRoot", ltACCOUNT_ROOT, {
|
||||
{ S_FIELD(Flags), STI_UINT32, SOE_FLAGS, 0 },
|
||||
{ S_FIELD(Account), STI_ACCOUNT, SOE_REQUIRED, 0 },
|
||||
{ S_FIELD(Sequence), STI_UINT32, SOE_REQUIRED, 0 },
|
||||
{ S_FIELD(Balance), STI_AMOUNT, SOE_REQUIRED, 0 },
|
||||
{ S_FIELD(LastReceive), STI_UINT32, SOE_REQUIRED, 0 },
|
||||
|
||||
@@ -3635,6 +3635,7 @@ TransactionEngineResult TransactionEngine::doPayment(const SerializedTransaction
|
||||
// Create the account.
|
||||
sleDst = entryCreate(ltACCOUNT_ROOT, Ledger::getAccountRootIndex(uDstAccountID));
|
||||
|
||||
sleDst->setIFieldAccount(sfAccount, uDstAccountID);
|
||||
sleDst->setIFieldU32(sfSequence, 1);
|
||||
}
|
||||
else
|
||||
@@ -3929,6 +3930,7 @@ TransactionEngineResult TransactionEngine::doWalletAdd(const SerializedTransacti
|
||||
// Create the account.
|
||||
sleDst = entryCreate(ltACCOUNT_ROOT, Ledger::getAccountRootIndex(uDstAccountID));
|
||||
|
||||
sleDst->setIFieldAccount(sfAccount, uDstAccountID);
|
||||
sleDst->setIFieldU32(sfSequence, 1);
|
||||
sleDst->setIFieldAmount(sfBalance, saAmount);
|
||||
sleDst->setIFieldAccount(sfAuthorizedKey, uAuthKeyID);
|
||||
|
||||
Reference in New Issue
Block a user