Fix tie breaking in ledger validation during preClose consensus phase.

This commit is contained in:
JoelKatz
2013-03-11 15:30:55 -07:00
parent 19ee5c6c22
commit 774c38f99c

View File

@@ -379,7 +379,8 @@ void LedgerConsensus::checkLCL()
typedef std::map<uint256, currentValidationCount>::value_type u256_cvc_pair;
BOOST_FOREACH(u256_cvc_pair& it, vals)
if (it.second.first > netLgrCount)
if ((it.second.first > netLgrCount) ||
((it.second.first == netLgrCount) && (it.first == mPrevLedgerHash)))
{
netLgr = it.first;
netLgrCount = it.second.first;