From 4d9500a0764cc590e4b11735c5ef94dc82497800 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sun, 15 Jul 2012 23:41:52 -0700 Subject: [PATCH] Bugfix. --- src/LedgerConsensus.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/LedgerConsensus.cpp b/src/LedgerConsensus.cpp index b4935cf9e..0c0576146 100644 --- a/src/LedgerConsensus.cpp +++ b/src/LedgerConsensus.cpp @@ -202,7 +202,9 @@ LedgerConsensus::LedgerConsensus(const uint256& prevLCLHash, Ledger::pointer pre mCloseResolution = ContinuousLedgerTiming::getNextLedgerTimeResolution( previousLedger->getCloseResolution(), previousLedger->getCloseAgree(), previousLedger->getLedgerSeq() + 1); - if (previousLedger->getHash() != prevLCLHash) + mHaveCorrectLCL = previousLedger->getHash() == prevLCLHash; + + if (!mHaveCorrectLCL) { mHaveCorrectLCL = mProposing = mValidating = false; mAcquiringLedger = theApp->getMasterLedgerAcquire().findCreate(prevLCLHash); @@ -213,10 +215,14 @@ LedgerConsensus::LedgerConsensus(const uint256& prevLCLHash, Ledger::pointer pre } else if (mValSeed.isValid()) { - mValidating = true; + mHaveCorrectLCL = mValidating = true; mProposing = theApp->getOPs().getOperatingMode() == NetworkOPs::omFULL; } - else mProposing = mValidating = false; + else + { + mHaveCorrectLCL = true; + mProposing = mValidating = false; + } } void LedgerConsensus::takeInitialPosition(Ledger::pointer initialLedger)