Skip to content

Commit

Permalink
Fix lint one more time
Browse files Browse the repository at this point in the history
  • Loading branch information
dimriou committed Sep 30, 2024
1 parent f372b14 commit e6b9cf7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/cmd/shell_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -684,12 +684,11 @@ func (s *Shell) RebroadcastTransactions(c *cli.Context) (err error) {
for i := int64(0); i < totalNonces; i++ {
nonces[i] = evmtypes.Nonce(beginningNonce + i)
}
if gasPriceWei > math.MaxInt64 {
err = fmt.Errorf("integer overflow conversion error. GasPrice: %v", gasPriceWei)
if gasPriceWei <= math.MaxInt64 {
return s.errorOut(ec.ForceRebroadcast(ctx, nonces, gas.EvmFee{GasPrice: assets.NewWeiI(int64(gasPriceWei))}, address, uint64(overrideGasLimit)))

Check failure on line 688 in core/cmd/shell_local.go

View workflow job for this annotation

GitHub Actions / lint

G115: integer overflow conversion uint64 -> int64 (gosec)
} else {

Check failure on line 689 in core/cmd/shell_local.go

View workflow job for this annotation

GitHub Actions / lint

indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)
err = ec.ForceRebroadcast(ctx, nonces, gas.EvmFee{GasPrice: assets.NewWeiI(int64(gasPriceWei))}, address, uint64(overrideGasLimit))
return s.errorOut(fmt.Errorf("integer overflow conversion error. GasPrice: %v", gasPriceWei))
}
return s.errorOut(err)
}

type HealthCheckPresenter struct {
Expand Down

0 comments on commit e6b9cf7

Please sign in to comment.