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

@@ -1164,7 +1164,7 @@ bool ApplicationImp::loadOldLedger (
std::uint32_t closeTime = getApp().getOPs().getCloseTimeNC ();
std::uint32_t closeTimeResolution = 30;
bool closeTimeEstimated = false;
std::uint64_t totalCoins = 0;
std::uint64_t totalDrops = 0;
if (ledger.get().isMember ("accountState"))
{
@@ -1188,7 +1188,7 @@ bool ApplicationImp::loadOldLedger (
}
if (ledger.get().isMember ("total_coins"))
{
totalCoins =
totalDrops =
beast::lexicalCastThrow<std::uint64_t>
(ledger.get()["total_coins"].asString());
}
@@ -1201,7 +1201,7 @@ bool ApplicationImp::loadOldLedger (
else
{
loadLedger = std::make_shared<Ledger> (seq, closeTime);
loadLedger->setTotalCoins(totalCoins);
loadLedger->setTotalDrops(totalDrops);
for (Json::UInt index = 0; index < ledger.get().size(); ++index)
{