Skip to content

Commit

Permalink
linterr
Browse files Browse the repository at this point in the history
Signed-off-by: nidhi-singh02 <[email protected]>
  • Loading branch information
nidhi-singh02 committed Sep 20, 2024
1 parent 28d38c2 commit 3ecedfd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mod/node-api/handlers/beacon/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ func (h *Handler[
func (h *Handler[
BeaconBlockHeaderT, ContextT, _, _,
]) determineSlot(req *beacontypes.GetBlockHeadersRequest) (math.Slot, error) {
var slot math.Slot
var parentRoot common.Root
switch {
case req.Slot != "" && req.ParentRoot != "":
Expand All @@ -86,7 +85,9 @@ func (h *Handler[
return 0, errVerify
}
if verifiedSlot != slot {
return 0, errors.New("provided slot does not match the slot for the given parent root")
return 0, errors.New(
"provided slot does not match the slot for the given parent root",
)
}
return slot, nil

Expand All @@ -106,7 +107,7 @@ func (h *Handler[
if err != nil {
return 0, errors.Wrapf(err, "invalid parent root: %v", req.ParentRoot)
}
slot, err = h.backend.GetSlotByParentRoot(parentRoot)
slot, err := h.backend.GetSlotByParentRoot(parentRoot)
if err != nil {
return 0, err
}
Expand Down

0 comments on commit 3ecedfd

Please sign in to comment.