mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 16:37:39 +00:00
Fix locks in Capella setters (#11569)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
968dc5d1e8
commit
b7b5b28c5a
@ -64,8 +64,8 @@ func (b *BeaconState) SetNextWithdrawalIndex(i uint64) error {
|
||||
return errNotSupported("SetNextWithdrawalIndex", b.version)
|
||||
}
|
||||
|
||||
b.lock.RLock()
|
||||
defer b.lock.RUnlock()
|
||||
b.lock.Lock()
|
||||
defer b.lock.Unlock()
|
||||
|
||||
b.nextWithdrawalIndex = i
|
||||
return nil
|
||||
@ -78,8 +78,8 @@ func (b *BeaconState) SetNextPartialWithdrawalValidatorIndex(i types.ValidatorIn
|
||||
return errNotSupported("SetNextPartialWithdrawalValidatorIndex", b.version)
|
||||
}
|
||||
|
||||
b.lock.RLock()
|
||||
defer b.lock.RUnlock()
|
||||
b.lock.Lock()
|
||||
defer b.lock.Unlock()
|
||||
|
||||
b.nextPartialWithdrawalValidatorIndex = i
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user