From 1e7588d0ab16ce11b5079cee746ede1bf1a0ba70 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 3 Jul 2015 19:06:03 -0700 Subject: [PATCH] Fix open ledger flag when jumping --- src/ripple/app/misc/NetworkOPs.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ripple/app/misc/NetworkOPs.cpp b/src/ripple/app/misc/NetworkOPs.cpp index 98ec8586b..717337d12 100644 --- a/src/ripple/app/misc/NetworkOPs.cpp +++ b/src/ripple/app/misc/NetworkOPs.cpp @@ -1408,14 +1408,16 @@ void NetworkOPsImp::switchLastClosedLedger ( clearNeedNetworkLedger (); newLCL->setClosed (); - auto newOL = std::make_shared (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);