Remove unnecessary state copy (#8303)

This commit is contained in:
Preston Van Loon 2021-01-20 18:00:01 -08:00 committed by GitHub
parent ffcadcf184
commit 9ec4f727c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,6 @@ func (s *Service) getAttPreState(ctx context.Context, c *ethpb.Checkpoint) (*sta
return nil, err return nil, err
} }
if epochStartSlot > baseState.Slot() { if epochStartSlot > baseState.Slot() {
baseState = baseState.Copy()
baseState, err = state.ProcessSlots(ctx, baseState, epochStartSlot) baseState, err = state.ProcessSlots(ctx, baseState, epochStartSlot)
if err != nil { if err != nil {
return nil, errors.Wrapf(err, "could not process slots up to epoch %d", c.Epoch) return nil, errors.Wrapf(err, "could not process slots up to epoch %d", c.Epoch)