Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-v committed Jul 12, 2024
1 parent 3033ec5 commit a8de185
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,21 +304,13 @@ void nextGossipMembers() {

final int step = gossipFanout;
final int limit = step * (size / step);
final int nextLimit;

if (index >= limit) {
index = 0;
nextLimit = step;
shuffle();
} else {
nextLimit = index + step;
if (nextLimit > limit) {
index = 0;
shuffle();
}
}

for (; index < nextLimit; index++) {
for (int n = index + step; index < n; index++) {
gossipMembers.add(remoteMembers.get(index));
}
}
Expand Down

0 comments on commit a8de185

Please sign in to comment.