mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-09 11:11:20 +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 {
|
for {
|
||||||
buf[seedSize] = r
|
buf[seedSize] = r
|
||||||
ph := hashfunc(buf[:pivotViewSize])
|
ph := hashfunc(buf[:pivotViewSize])
|
||||||
pivot := bytesutil.FromBytes8(ph[:8]) % listSize
|
pivot := binary.LittleEndian.Uint64(ph[:8]) % listSize
|
||||||
mirror := (pivot + 1) >> 1
|
mirror := (pivot + 1) >> 1
|
||||||
binary.LittleEndian.PutUint32(buf[pivotViewSize:], uint32(pivot>>8))
|
binary.LittleEndian.PutUint32(buf[pivotViewSize:], uint32(pivot>>8))
|
||||||
source := hashfunc(buf)
|
source := hashfunc(buf)
|
||||||
|
Loading…
Reference in New Issue
Block a user