Add LedgerHolder class, use in LedgerMaster

This commit is contained in:
JoelKatz
2014-01-06 11:30:31 -08:00
committed by Vinnie Falco
parent 8f8b2ae4a3
commit a0f6429652
10 changed files with 182 additions and 112 deletions

View File

@@ -86,7 +86,7 @@ Json::Value RPCHandler::transactionSign (Json::Value params, bool bSubmit, bool
}
std::string sType = txJSON["TransactionType"].asString ();
Ledger::pointer lSnapshot = mNetOps->getCurrentSnapshot ();
Ledger::pointer lSnapshot = mNetOps->getCurrentLedger ();
AccountState::pointer asSrc = bOffline
? AccountState::pointer () // Don't look up address if offline.
: mNetOps->getAccountState (lSnapshot, raSrcAddressID);
@@ -3045,7 +3045,7 @@ Json::Value RPCHandler::lookupLedger (Json::Value params, Ledger::pointer& lpLed
switch (iLedgerIndex)
{
case LEDGER_CURRENT:
lpLedger = mNetOps->getCurrentSnapshot ();
lpLedger = mNetOps->getCurrentLedger ();
iLedgerIndex = lpLedger->getLedgerSeq ();
assert (lpLedger->isImmutable () && !lpLedger->isClosed ());
break;