Fix a bug that can cause us to fail to realize we're in sync.

This commit is contained in:
JoelKatz
2013-04-21 16:34:10 -07:00
parent 4b04f74289
commit f07e6d82f6

View File

@@ -290,7 +290,10 @@ void LedgerConsensus::handleLCL(const uint256& lclHash)
{ // we need to switch the ledger we're working from
Ledger::pointer newLCL = theApp->getLedgerMaster().getLedgerByHash(lclHash);
if (newLCL)
{
mPreviousLedger = newLCL;
mPrevLedgerHash = newLCL->getHash();
}
else if (!mAcquiringLedger || (mAcquiringLedger->getHash() != mPrevLedgerHash))
{ // need to start acquiring the correct consensus LCL
cLog(lsWARNING) << "Need consensus ledger " << mPrevLedgerHash;