mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-24 20:37:17 +00:00
Remove duplicated randao mix copy (#6420)
* remove duplicated randao mix copy * Merge refs/heads/master into rm-dup-copy * Merge refs/heads/master into rm-dup-copy * Merge refs/heads/master into rm-dup-copy
This commit is contained in:
parent
98757e759c
commit
886afb054c
@ -45,12 +45,5 @@ func Seed(state *stateTrie.BeaconState, epoch uint64, domain [bls.DomainByteLeng
|
||||
// """
|
||||
// return state.randao_mixes[epoch % EPOCHS_PER_HISTORICAL_VECTOR]
|
||||
func RandaoMix(state *stateTrie.BeaconState, epoch uint64) ([]byte, error) {
|
||||
currMix, err := state.RandaoMixAtIndex(epoch % params.BeaconConfig().EpochsPerHistoricalVector)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
newMixLength := len(currMix)
|
||||
newMix := make([]byte, newMixLength)
|
||||
copy(newMix, currMix)
|
||||
return newMix, nil
|
||||
return state.RandaoMixAtIndex(epoch % params.BeaconConfig().EpochsPerHistoricalVector)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user