mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Begin cleaning up the handling of ledger changes during the consensus window.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user