chore: improve distribution of rewardSeed #1831

Merged
Sainan merged 2 commits from rewardseed into main 2025-04-25 11:53:55 -07:00
Showing only changes of commit 0b1b098192 - Show all commits

View File

@ -126,6 +126,7 @@ export const generateRewardSeed = (): bigint => {
let seed = (BigInt(hiDword) << 32n) | BigInt(loDword);
if (Math.random() < 0.5) {
seed *= -1n;
seed -= 1n;
}
return seed;
};