Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 16-bit random value in validator filter #8916

Merged
merged 12 commits into from
Dec 17, 2024
Prev Previous commit
Next Next commit
keep code checker happy
Signed-off-by: Paul Harris <paul.harris@consensys.net>
  • Loading branch information
rolfyone committed Dec 17, 2024
commit 96160b69e0a395625b58b6a9b4d299d78b2e99d2
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
final int shuffledIndex =
miscHelpers.computeShuffledIndex(i % activeValidatorCount, activeValidatorCount, seed);
final int candidateIndex = activeValidatorIndices.getInt(shuffledIndex);
final int offset = i % 16 * 2;
final int offset = (i % 16) * 2;
final UInt64 randomValue = bytesToUInt64(randomBytes.slice(offset, 2));
Dismissed Show dismissed Hide dismissed
final UInt64 effectiveBalance = validators.get(candidateIndex).getEffectiveBalance();
if (effectiveBalance
Expand All @@ -154,3 +154,3 @@
return syncCommitteeIndices;
}
}
Loading