Begin cleaning up the handling of ledger changes during the consensus window.

This commit is contained in:
JoelKatz
2012-10-19 14:24:32 -07:00
parent 887a87081f
commit d3e91345c9

View File

@@ -247,11 +247,16 @@ LedgerConsensus::LedgerConsensus(const uint256& prevLCLHash, Ledger::ref previou
mProposing = mValidating = false;
}
handleLCL(prevLCLHash);
mHaveCorrectLCL = (mPreviousLedger->getHash() == mPrevLedgerHash);
if (!mHaveCorrectLCL)
{
cLog(lsINFO) << "Entering consensus with: " << previousLedger->getHash();
cLog(lsINFO) << "Correct LCL is: " << prevLCLHash;
handleLCL(mPrevLedgerHash);
if (!mHaveCorrectLCL)
{
mProposing = mValidating = false;
cLog(lsINFO) << "Entering consensus with: " << previousLedger->getHash();
cLog(lsINFO) << "Correct LCL is: " << prevLCLHash;
}
}
}
@@ -357,7 +362,7 @@ void LedgerConsensus::handleLCL(const uint256& lclHash)
}
}
cLog(lsINFO) << "Acquired the consensus ledger " << mPrevLedgerHash;
cLog(lsINFO) << "Have the consensus ledger " << mPrevLedgerHash;
mHaveCorrectLCL = true;
mAcquiringLedger = LedgerAcquire::pointer();
theApp->getOPs().clearNeedNetworkLedger();