Don't count unconnected peers. Remove a FIXME.

This commit is contained in:
JoelKatz
2012-06-20 18:25:29 -07:00
parent b6d4750848
commit e63b68182d

View File

@@ -381,17 +381,17 @@ bool NetworkOPs::checkLastClosedLedger(const std::vector<Peer::pointer>& peerLis
{
Log(lsDEBUG) << "NOP::CS Dead pointer in peer list";
}
else
else if ((*it)->isConnected())
{
uint256 peerLedger = (*it)->getClosedLedgerHash();
if (!!peerLedger)
{
// FIXME: If we have this ledger, don't count it if it's too far past its close time
ValidationCount& vc = ledgers[peerLedger];
if ((vc.nodesUsing == 0) || ((*it)->getNodePublic() > vc.highNode))
vc.highNode = (*it)->getNodePublic();
++vc.nodesUsing;
}
else Log(lsTRACE) << "Connected peer announces no LCL";
}
}