mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-27 23:38:08 +00:00
Balance peer selection in getFetchPack
This commit is contained in:
@@ -576,9 +576,7 @@ public:
|
||||
{
|
||||
if (peer->hasRange (nextLedger->getLedgerSeq() - 1, nextLedger->getLedgerSeq()))
|
||||
{
|
||||
if (count++ == 0)
|
||||
target = peer;
|
||||
else if ((rand () % ++count) == 0)
|
||||
if ((count++ == 0) || ((rand() % count) == 0))
|
||||
target = peer;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user