From 886afb054cdb3f9e7370664045d82506bca6455c Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Fri, 26 Jun 2020 11:27:48 -0700 Subject: [PATCH] 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 --- beacon-chain/core/helpers/randao.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/beacon-chain/core/helpers/randao.go b/beacon-chain/core/helpers/randao.go index c2ca4c1fd..25774fb9b 100644 --- a/beacon-chain/core/helpers/randao.go +++ b/beacon-chain/core/helpers/randao.go @@ -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) }