mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Make our ledger a bit stickier to avoid the "check at the wrong time"
problem (when you don't have enough validations for the latest ledger and so jump backwards when you shouldn't. This solves every known ledger consensus issue except the "stuck one ledger behind" issue. I'm working on that now.
This commit is contained in:
@@ -247,10 +247,7 @@ void LedgerConsensus::checkLCL()
|
||||
uint256 netLgr = mPrevLedgerHash;
|
||||
int netLgrCount = 0;
|
||||
|
||||
uint256 favorLedger;
|
||||
if (mState != lcsPRE_CLOSE)
|
||||
favorLedger = mPrevLedgerHash;
|
||||
boost::unordered_map<uint256, int> vals = theApp->getValidations().getCurrentValidations(favorLedger);
|
||||
boost::unordered_map<uint256, int> vals = theApp->getValidations().getCurrentValidations(mPrevLedgerHash);
|
||||
|
||||
typedef std::pair<const uint256, int> u256_int_pair;
|
||||
BOOST_FOREACH(u256_int_pair& it, vals)
|
||||
|
||||
Reference in New Issue
Block a user