Fix open ledger flag when jumping

This commit is contained in:
Vinnie Falco
2015-07-03 19:06:03 -07:00
parent b6b3548c0c
commit 1e7588d0ab

View File

@@ -1408,14 +1408,16 @@ void NetworkOPsImp::switchLastClosedLedger (
clearNeedNetworkLedger ();
newLCL->setClosed ();
auto newOL = std::make_shared<Ledger> (false, std::ref (*newLCL));
auto const newOL = std::make_shared<
Ledger>(false, std::ref (*newLCL));
// Caller must own master lock
{
// Apply tx in old open ledger to new
// open ledger. Then apply local tx.
// open ledger, then apply local tx.
auto const oldOL =
m_ledgerMaster.getCurrentLedger();
MetaView accum(*newLCL, tapNONE);
MetaView accum(*newOL, tapNONE);
assert(accum.open());
auto retries = m_localTX->getTxSet();
applyTransactions (&oldOL->txMap(),
accum, newLCL, retries);