From 6734331f834a31cb26e565364160d178a1417edb Mon Sep 17 00:00:00 2001 From: sweexordious Date: Thu, 4 Jul 2024 11:04:51 +0100 Subject: [PATCH] chore: lint --- cmd/blobstream-ops/replay/cmd.go | 2 +- replay/evm.go | 7 +++---- replay/replayer.go | 9 ++++----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/cmd/blobstream-ops/replay/cmd.go b/cmd/blobstream-ops/replay/cmd.go index bc4a290..3825032 100644 --- a/cmd/blobstream-ops/replay/cmd.go +++ b/cmd/blobstream-ops/replay/cmd.go @@ -21,7 +21,7 @@ func Command() *cobra.Command { Short: "BlobstreamX deployment verification", Long: "verifies that a BlobstreamX contract is committing to valid data", SilenceUsage: true, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { config, err := parseFlags(cmd) if err != nil { return err diff --git a/replay/evm.go b/replay/evm.go index 498afcf..0ae91b5 100644 --- a/replay/evm.go +++ b/replay/evm.go @@ -152,11 +152,10 @@ func submitProof( opts.GasPrice = big.NewInt(bigGasPrice.Int64() + bigGasPrice.Int64()/5) logger.Debug("transaction still not included, accelerating...", "new_gas_price", opts.GasPrice.Int64()) continue - } else { - logger.Error("transaction failed", "err", err.Error()) - logger.Debug("retrying...") - return err } + logger.Error("transaction failed", "err", err.Error()) + logger.Debug("retrying...") + return err } return nil } diff --git a/replay/replayer.go b/replay/replayer.go index 49716e8..eb442c7 100644 --- a/replay/replayer.go +++ b/replay/replayer.go @@ -375,11 +375,10 @@ func getAllDataCommitmentStoredEvents( _, exists := dataCommitmentEvents[int64(events.Event.StartBlock)] if exists { continue - } else { - dataCommitmentEvents[int64(events.Event.StartBlock)] = *events.Event - if int64(events.Event.StartBlock) < latestTargetContractBlock { - gatheredTheNecessaryEvents = true - } + } + dataCommitmentEvents[int64(events.Event.StartBlock)] = *events.Event + if int64(events.Event.StartBlock) < latestTargetContractBlock { + gatheredTheNecessaryEvents = true } } if !events.Next() {