mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix a bug that could cause an idle ledger to spend insufficient time
establishing a consensus.
This commit is contained in:
@@ -200,6 +200,8 @@ LedgerConsensus::LedgerConsensus(const uint256& prevLCLHash, const Ledger::point
|
||||
mCurrentMSeconds(0), mClosePercent(0), mHaveCloseTimeConsensus(false)
|
||||
{
|
||||
mValSeed = theConfig.VALIDATION_SEED;
|
||||
mConsensusStartTime = boost::posix_time::microsec_clock::universal_time();
|
||||
|
||||
Log(lsDEBUG) << "Creating consensus object";
|
||||
Log(lsTRACE) << "LCL:" << previousLedger->getHash().GetHex() <<", ct=" << closeTime;
|
||||
mPreviousProposers = theApp->getOPs().getPreviousProposers();
|
||||
@@ -491,8 +493,8 @@ void LedgerConsensus::timerEntry()
|
||||
Log(lsINFO) << "Need consensus ledger " << mPrevLedgerHash.GetHex();
|
||||
}
|
||||
|
||||
mCurrentMSeconds = (mCloseTime == 0) ? 0 :
|
||||
(boost::posix_time::microsec_clock::universal_time() - mConsensusStartTime).total_milliseconds();
|
||||
mCurrentMSeconds =
|
||||
(boost::posix_time::microsec_clock::universal_time() - mConsensusStartTime).total_milliseconds();
|
||||
mClosePercent = mCurrentMSeconds * 100 / mPreviousMSeconds;
|
||||
|
||||
switch (mState)
|
||||
|
||||
Reference in New Issue
Block a user