Do Not Copy State During Upgrade (#10102)

* no copy

* no copy

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
Nishant Das 2022-01-20 14:54:21 +08:00 committed by GitHub
parent 52f1190b17
commit af06bb9737
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ func UpgradeToAltair(ctx context.Context, state state.BeaconState) (state.Beacon
InactivityScores: make([]uint64, numValidators), InactivityScores: make([]uint64, numValidators),
} }
newState, err := statealtair.InitializeFromProto(s) newState, err := statealtair.InitializeFromProtoUnsafe(s)
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@ -82,5 +82,5 @@ func UpgradeToMerge(ctx context.Context, state state.BeaconState) (state.BeaconS
}, },
} }
return v3.InitializeFromProto(s) return v3.InitializeFromProtoUnsafe(s)
} }