mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Don't count unconnected peers. Remove a FIXME.
This commit is contained in:
@@ -381,17 +381,17 @@ bool NetworkOPs::checkLastClosedLedger(const std::vector<Peer::pointer>& peerLis
|
|||||||
{
|
{
|
||||||
Log(lsDEBUG) << "NOP::CS Dead pointer in peer list";
|
Log(lsDEBUG) << "NOP::CS Dead pointer in peer list";
|
||||||
}
|
}
|
||||||
else
|
else if ((*it)->isConnected())
|
||||||
{
|
{
|
||||||
uint256 peerLedger = (*it)->getClosedLedgerHash();
|
uint256 peerLedger = (*it)->getClosedLedgerHash();
|
||||||
if (!!peerLedger)
|
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];
|
ValidationCount& vc = ledgers[peerLedger];
|
||||||
if ((vc.nodesUsing == 0) || ((*it)->getNodePublic() > vc.highNode))
|
if ((vc.nodesUsing == 0) || ((*it)->getNodePublic() > vc.highNode))
|
||||||
vc.highNode = (*it)->getNodePublic();
|
vc.highNode = (*it)->getNodePublic();
|
||||||
++vc.nodesUsing;
|
++vc.nodesUsing;
|
||||||
}
|
}
|
||||||
|
else Log(lsTRACE) << "Connected peer announces no LCL";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user