mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 19:40:37 +00:00
Minor Optimization on InnerShuffleList (#12690)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
dbc17cf2ca
commit
a820d4dcc8
@ -184,7 +184,7 @@ func innerShuffleList(input []primitives.ValidatorIndex, seed [32]byte, shuffle
|
||||
for {
|
||||
buf[seedSize] = r
|
||||
ph := hashfunc(buf[:pivotViewSize])
|
||||
pivot := bytesutil.FromBytes8(ph[:8]) % listSize
|
||||
pivot := binary.LittleEndian.Uint64(ph[:8]) % listSize
|
||||
mirror := (pivot + 1) >> 1
|
||||
binary.LittleEndian.PutUint32(buf[pivotViewSize:], uint32(pivot>>8))
|
||||
source := hashfunc(buf)
|
||||
|
Loading…
Reference in New Issue
Block a user