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

cmd: refactor evm tool #30633

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions cmd/evm/blockrunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
"os"
"regexp"
"slices"
"sort"

"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/tests"
"github.com/urfave/cli/v2"
"golang.org/x/exp/maps"
lightclient marked this conversation as resolved.
Show resolved Hide resolved
)

var blockTestCommand = &cli.Command{
Expand Down Expand Up @@ -80,11 +80,8 @@ func runBlockTest(ctx *cli.Context, fname string) ([]testResult, error) {
tracer := tracerFromFlags(ctx)

// Pull out keys to sort and ensure tests are run in order.
lightclient marked this conversation as resolved.
Show resolved Hide resolved
var keys []string
for key := range tests {
keys = append(keys, key)
}
sort.Strings(keys)
keys := maps.Keys(tests)
slices.Sort(keys)

// Run all the tests.
var results []testResult
Expand Down
2 changes: 1 addition & 1 deletion cmd/evm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ var (
var traceFlags = []cli.Flag{
TraceFlag,
TraceFormatFlag,
TraceDisableMemoryFlag,
TraceDisableStackFlag,
TraceDisableMemoryFlag,
TraceDisableStorageFlag,
TraceDisableReturnDataFlag,

Expand Down