mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
Unlock mutex on return (#6303)
Co-authored-by: Nishant Das <nishdas93@gmail.com> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
parent
5201403750
commit
10af753f59
@ -334,6 +334,7 @@ func (is *infostream) generatePendingValidatorInfo(info *ethpb.ValidatorInfo) (*
|
||||
var ok bool
|
||||
deposit, ok = fetchedDeposit.(*eth1Deposit)
|
||||
if !ok {
|
||||
is.eth1DepositsMutex.Unlock()
|
||||
return nil, errors.New("cached eth1 deposit is not type *eth1Deposit")
|
||||
}
|
||||
} else {
|
||||
@ -501,6 +502,7 @@ func (is *infostream) depositQueueTimestamp(eth1BlockNumber *big.Int) (uint64, e
|
||||
var ok bool
|
||||
blockTimestamp, ok = cachedTimestamp.(uint64)
|
||||
if !ok {
|
||||
is.eth1BlocktimesMutex.Unlock()
|
||||
return 0, errors.New("cached timestamp is not type uint64")
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user