Skip to content

Commit

Permalink
Fix CI lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
anacrolix committed Aug 19, 2024
1 parent 5a330b4 commit 0410b7e
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
3 changes: 2 additions & 1 deletion cannon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"context"
"errors"
"fmt"
"os"

"github.com/ethereum-optimism/optimism/op-service/ctxinterrupt"
"github.com/urfave/cli/v2"
"os"

"github.com/ethereum-optimism/optimism/cannon/cmd"
)
Expand Down
1 change: 0 additions & 1 deletion op-chain-ops/script/console2_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -1511,4 +1511,3 @@ func (c *ConsolePrecompile) Log_59cfcbe3(p0 *big.Int, p1 *big.Int, p2 *big.Int,
func (c *ConsolePrecompile) Log_193fb800(p0 *big.Int, p1 *big.Int, p2 *big.Int, p3 *big.Int) {
c.log("p0", p0, "p1", p1, "p2", p2, "p3", p3)
}

2 changes: 1 addition & 1 deletion op-conductor/consensus/raft_fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewUnsafeHeadTracker(log log.Logger) *unsafeHeadTracker {

// Apply implements raft.FSM, it applies the latest change (latest unsafe head payload) to FSM.
func (t *unsafeHeadTracker) Apply(l *raft.Log) interface{} {
if l.Data == nil || len(l.Data) == 0 {
if len(l.Data) == 0 {
return fmt.Errorf("log data is nil or empty")
}

Expand Down
5 changes: 3 additions & 2 deletions op-heartbeat/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/ethereum-optimism/optimism/op-service/ctxinterrupt"
"io"
"net"
"net/http"
"strconv"
"strings"
"time"

"github.com/ethereum-optimism/optimism/op-service/ctxinterrupt"

"github.com/urfave/cli/v2"

"github.com/ethereum/go-ethereum/log"
Expand Down Expand Up @@ -45,7 +46,7 @@ func Main(version string) func(ctx *cli.Context) error {
l.Crit("error starting application", "err", err)
}

ctxinterrupt.Wait(cliCtx.Context)
_ = ctxinterrupt.Wait(cliCtx.Context)
// Possibly a better context here would be one that has an interrupt installed for forced
// shutdown as used elsewhere.
return srv.Stop(context.Background())
Expand Down
3 changes: 2 additions & 1 deletion op-proposer/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package main

import (
"context"
"github.com/ethereum-optimism/optimism/op-service/ctxinterrupt"
"os"

"github.com/ethereum-optimism/optimism/op-service/ctxinterrupt"

opservice "github.com/ethereum-optimism/optimism/op-service"
"github.com/urfave/cli/v2"

Expand Down
3 changes: 2 additions & 1 deletion op-service/ctxinterrupt/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package ctxinterrupt

import (
"context"
"github.com/stretchr/testify/require"
"testing"

"github.com/stretchr/testify/require"
)

func TestContextKeyIsUnique(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion op-service/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import (
"context"
"errors"
"fmt"
"github.com/ethereum-optimism/optimism/op-service/ctxinterrupt"
"os"
"path/filepath"
"reflect"
"strings"
"time"

"github.com/ethereum-optimism/optimism/op-service/ctxinterrupt"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/urfave/cli/v2"
Expand Down

0 comments on commit 0410b7e

Please sign in to comment.