I believe this trivial change solves the "stuck one ledger behind" problem.

If the ledger is open, there should be no significant number of proposals
for a subsequent ledger. If there is, we are a ledger behind.
This commit is contained in:
JoelKatz
2012-09-08 03:51:56 -07:00
parent e2137ea5af
commit 9222eee1df

View File

@@ -247,6 +247,7 @@ void LedgerConsensus::checkLCL()
uint256 netLgr = mPrevLedgerHash;
int netLgrCount = 0;
uint256 favoredLedger = (mState == PRE_CLOSE) ? uint256() : mPrevLedgerHash; // Don't get stuck one ledger behind
boost::unordered_map<uint256, int> vals = theApp->getValidations().getCurrentValidations(mPrevLedgerHash);
typedef std::pair<const uint256, int> u256_int_pair;