Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
improve: use errors.New to replace fmt.Errorf with no parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengenH committed Apr 20, 2024
1 parent 8ec74fa commit bbb10d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions driver/state/l1_current.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package state

import (
"context"
"fmt"
"errors"
"math/big"

"github.com/ethereum/go-ethereum/common"
Expand All @@ -29,7 +29,7 @@ func (s *State) SetL1Current(h *types.Header) {
// BlockProposed event with given blockID / blockHash.
func (s *State) ResetL1Current(ctx context.Context, blockID *big.Int) error {
if blockID == nil {
return fmt.Errorf("empty block ID")
return errors.New("empty block ID")
}

log.Info("Reset L1 current cursor", "blockID", blockID)
Expand Down

0 comments on commit bbb10d1

Please sign in to comment.