accounts, core: fix lint issues

This commit is contained in:
Martin Holst Swende 2023-10-25 10:57:10 +02:00
parent f786e6f4f4
commit f4722b3a4d
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0
2 changed files with 3 additions and 3 deletions

View file

@ -22,7 +22,7 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/google/gofuzz" fuzz "github.com/google/gofuzz"
) )
// TestReplicate can be used to replicate crashers from the fuzzing tests. // TestReplicate can be used to replicate crashers from the fuzzing tests.
@ -163,7 +163,7 @@ func upTo(fuzzer *fuzz.Fuzzer, max int) int {
if i < 0 { if i < 0 {
return (-1 - i) % max return (-1 - i) % max
} }
return int(i) % max return i % max
} }
func oneOf(fuzzer *fuzz.Fuzzer, options []string) string { func oneOf(fuzzer *fuzz.Fuzzer, options []string) string {

View file

@ -55,7 +55,7 @@ func FuzzPrecompiledContracts(f *testing.F) {
addrs = append(addrs, k) addrs = append(addrs, k)
} }
f.Fuzz(func(t *testing.T, addr uint8, input []byte) { f.Fuzz(func(t *testing.T, addr uint8, input []byte) {
a := addrs[int(int(addr)%len(addrs))] a := addrs[int(addr)%len(addrs)]
p := allPrecompiles[a] p := allPrecompiles[a]
gas := p.RequiredGas(input) gas := p.RequiredGas(input)
if gas > 10_000_000 { if gas > 10_000_000 {