From 9222eee1df973db85be26596afeb9ee366a6ed42 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sat, 8 Sep 2012 03:51:56 -0700 Subject: [PATCH] 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. --- src/LedgerConsensus.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/LedgerConsensus.cpp b/src/LedgerConsensus.cpp index 802810f681..5a4c27341c 100644 --- a/src/LedgerConsensus.cpp +++ b/src/LedgerConsensus.cpp @@ -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 vals = theApp->getValidations().getCurrentValidations(mPrevLedgerHash); typedef std::pair u256_int_pair;