lock state (#11796)

This commit is contained in:
Nishant Das 2022-12-20 15:39:35 +08:00 committed by GitHub
parent ce125b763c
commit 90d5f6097c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -889,6 +889,8 @@ func (b *BeaconState) resetFieldTrie(index nativetypes.FieldIndex, elements inte
}
func finalizerCleanup(b *BeaconState) {
b.lock.Lock()
defer b.lock.Unlock()
for field, v := range b.sharedFieldReferences {
v.MinusRef()
if b.stateFieldLeaves[field].FieldReference() != nil {