From 00199d39156181d812045f903926015cf6cc7e39 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 3 Sep 2012 20:36:51 -0700 Subject: [PATCH] An imperfect fix for the case where we get validations during the consensus process for the next ledger and think it's a change in the previous ledger. --- src/LedgerConsensus.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/LedgerConsensus.cpp b/src/LedgerConsensus.cpp index b60c42fb64..fa94f5630b 100644 --- a/src/LedgerConsensus.cpp +++ b/src/LedgerConsensus.cpp @@ -264,6 +264,7 @@ void LedgerConsensus::checkLCL() if (netLgr != mPrevLedgerHash) { // LCL change Log(lsWARNING) << "View of consensus changed during consensus (" << netLgrCount << ")"; + Log(lsWARNING) << mPrevLedgerHash << " to " << netLgr; if (mHaveCorrectLCL) theApp->getOPs().consensusViewChange(); handleLCL(netLgr); @@ -519,7 +520,8 @@ void LedgerConsensus::stateAccepted() void LedgerConsensus::timerEntry() { - checkLCL(); + if ((!mHaveCorrectLCL) || (mState == lcsPRE_CLOSE)) + checkLCL(); mCurrentMSeconds = (boost::posix_time::microsec_clock::universal_time() - mConsensusStartTime).total_milliseconds();