Fix a case where a node that closed slightly ahead of other ledgers can

think it's out of sync with the network and cause it to jump backwards one
ledger, causing it to be out of sync because the network was about to catch
up to it.
This commit is contained in:
JoelKatz
2013-03-14 11:48:29 -07:00
parent 82b91a1c41
commit d4323f2ef2
5 changed files with 15 additions and 8 deletions

View File

@@ -685,7 +685,7 @@ bool NetworkOPs::checkLastClosedLedger(const std::vector<Peer::pointer>& peerLis
boost::unordered_map<uint256, ValidationCount> ledgers;
{
boost::unordered_map<uint256, currentValidationCount> current =
theApp->getValidations().getCurrentValidations(closedLedger);
theApp->getValidations().getCurrentValidations(closedLedger, prevClosedLedger);
typedef std::map<uint256, currentValidationCount>::value_type u256_cvc_pair;
BOOST_FOREACH(const u256_cvc_pair& it, current)
{