Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/fuzzers: move fuzzers into native packages #28467

Merged
merged 16 commits into from
Nov 14, 2023
Merged
Prev Previous commit
Next Next commit
accounts, core: fix lint issues
  • Loading branch information
holiman committed Nov 2, 2023
commit 6e6851f632d5bda1b817c29cc8a72dfa028a92bd
4 changes: 2 additions & 2 deletions accounts/abi/abifuzzer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"
"testing"

"github.com/google/gofuzz"
fuzz "github.com/google/gofuzz"
)

// TestReplicate can be used to replicate crashers from the fuzzing tests.
Expand Down Expand Up @@ -163,7 +163,7 @@ func upTo(fuzzer *fuzz.Fuzzer, max int) int {
if i < 0 {
return (-1 - i) % max
}
return int(i) % max
return i % max
}

func oneOf(fuzzer *fuzz.Fuzzer, options []string) string {
Expand Down
2 changes: 1 addition & 1 deletion core/vm/contracts_fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func FuzzPrecompiledContracts(f *testing.F) {
addrs = append(addrs, k)
}
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]
gas := p.RequiredGas(input)
if gas > 10_000_000 {
Expand Down