Replace Ledger with ReadView in most RPC handlers.

This commit is contained in:
Tom Ritchford
2015-07-08 12:12:47 -04:00
committed by Vinnie Falco
parent c7ebe7205c
commit 1d09c54fdc
33 changed files with 166 additions and 127 deletions

View File

@@ -90,32 +90,29 @@ void fillJsonTx (Object& json, LedgerFill const& fill)
try
{
using value_type = ReadView::txs_type::value_type;
forEachTx(fill.ledger, [&] (value_type const& i) {
for (auto& i: fill.ledger.txs)
{
count.yield();
if (! bExpanded)
{
txns.append(to_string(i.first->getTransactionID()));
return true;
}
auto&& txJson = appendObject (txns);
if (bBinary)
else if (bBinary)
{
auto&& txJson = appendObject (txns);
txJson[jss::tx_blob] = serializeHex(*i.first);
if (i.second)
txJson[jss::meta] = serializeHex(*i.second);
}
else
{
auto&& txJson = appendObject (txns);
copyFrom(txJson, i.first->getJson(0));
if (i.second)
txJson[jss::metaData] = i.second->getJson(0);
}
return true;
});
}
}
catch (...)
{