mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
accounts, core: fix lint issues
This commit is contained in:
parent
f786e6f4f4
commit
f4722b3a4d
2 changed files with 3 additions and 3 deletions
|
|
@ -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 {
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue