mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
Check for nil duties on checkDependentRoots (#15241)
This commit is contained in:
@@ -1146,6 +1146,9 @@ func (v *validator) checkDependentRoots(ctx context.Context, head *structs.HeadE
|
||||
if head == nil {
|
||||
return errors.New("received empty head event")
|
||||
}
|
||||
if v.duties == nil {
|
||||
return errors.New("duties are not initialized")
|
||||
}
|
||||
prevDepedentRoot, err := bytesutil.DecodeHexWithLength(head.PreviousDutyDependentRoot, fieldparams.RootLength)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to decode previous duty dependent root")
|
||||
|
||||
Reference in New Issue
Block a user