mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Make the account state tag more readable.
This commit is contained in:
@@ -401,7 +401,16 @@ void Ledger::addJson(Json::Value& ret, int options)
|
||||
SerializedLedgerEntry sle(sit, item->getTag());
|
||||
state.append(sle.getJson(0));
|
||||
}
|
||||
else state.append(item->getTag().GetHex());
|
||||
else
|
||||
{ // 16-bit namespace, 160-bit tag, 80-bit index
|
||||
const uint256& tag = item->getTag();
|
||||
uint160 account;
|
||||
memcpy(account.begin(), tag.begin() + 4, account.size());
|
||||
NewcoinAddress naAccount;
|
||||
naAccount.setAccountID(account);
|
||||
state.append(strHex(tag.begin(), 4) + ":" + naAccount.humanAccountID() + ":" +
|
||||
strHex(tag.begin() + 4 + account.size(), tag.size() - (account.size() + 4)));
|
||||
}
|
||||
}
|
||||
ledger["AccountState"] = state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user