Skip to content

Commit

Permalink
Specify errors
Browse files Browse the repository at this point in the history
  • Loading branch information
terencechain committed Sep 27, 2023
1 parent c65b2c1 commit fbb9680
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func (vs *Server) getParentBlockHash(ctx context.Context, st state.BeaconState,
func getParentBlockHashPostCapella(st state.BeaconState) ([]byte, error) {
header, err := st.LatestExecutionPayloadHeader()
if err != nil {
return nil, err
return nil, errors.Wrap(err, "could not get post capella payload header")
}
return header.BlockHash(), nil
}
Expand All @@ -296,7 +296,7 @@ func getParentBlockHashPostCapella(st state.BeaconState) ([]byte, error) {
func getParentBlockHashPostMerge(st state.BeaconState) ([]byte, error) {
header, err := st.LatestExecutionPayloadHeader()
if err != nil {
return nil, err
return nil, errors.Wrap(err, "could not get post merge payload header")
}
return header.ParentHash(), nil
}
Expand Down

0 comments on commit fbb9680

Please sign in to comment.