312 if payloadRoot != headerRoot {
313 return errors.New("cannot unblind with different execution data")
314 }
315 if err := b.SetExecution(e); err != nil { 316 return err
317 }
318 return nil
361 return err
362 }
363 pbState.Validators = valEntries
364 if err := valIdxBkt.Put(rootHash, validatorKey); err != nil {365 return err
366 }
367 return nil
343 return err
344 }
345 pbState.Validators = valEntries
346 if err := valIdxBkt.Put(rootHash, validatorKey); err != nil {347 return err
348 }
349 return nil
325 return err
326 }
327 pbState.Validators = valEntries
328 if err := valIdxBkt.Put(rootHash, validatorKey); err != nil {329 return err
330 }
331 return nil
307 return err
308 }
309 pbState.Validators = valEntries
310 if err := valIdxBkt.Put(rootHash, validatorKey); err != nil {311 return err
312 }
313 return nil
Some simple error checking patterns can be reduced to just a single return
statement returning a variable of type Error
.
if err != nil {
return err
}
return nil
return err