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

Variable 'tests' conflicts with imported package name #29588

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/evm/blockrunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ func blockTestCmd(ctx *cli.Context) error {
if err != nil {
return err
}
var tests map[string]tests.BlockTest
if err = json.Unmarshal(src, &tests); err != nil {
var evmTests map[string]tests.BlockTest
if err = json.Unmarshal(src, &evmTests); err != nil {
return err
}
re, err := regexp.Compile(ctx.String(RunFlag.Name))
Expand All @@ -77,15 +77,15 @@ func blockTestCmd(ctx *cli.Context) error {

// Run them in order
var keys []string
for key := range tests {
for key := range evmTests {
keys = append(keys, key)
}
sort.Strings(keys)
for _, name := range keys {
if !re.MatchString(name) {
continue
}
test := tests[name]
test := evmTests[name]
if err := test.Run(false, rawdb.HashScheme, tracer, func(res error, chain *core.BlockChain) {
if ctx.Bool(DumpFlag.Name) {
if state, _ := chain.State(); state != nil {
Expand Down