cmd/evm: review fixes

This commit is contained in:
lightclient 2024-11-21 17:23:07 +08:00
parent 7c34200d74
commit 092b99f49f
No known key found for this signature in database
GPG Key ID: 75C916AFEE20183E
2 changed files with 4 additions and 7 deletions

View File

@ -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"
)
var blockTestCommand = &cli.Command{
@ -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.
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

View File

@ -189,8 +189,8 @@ var (
var traceFlags = []cli.Flag{
TraceFlag,
TraceFormatFlag,
TraceDisableMemoryFlag,
TraceDisableStackFlag,
TraceDisableMemoryFlag,
TraceDisableStorageFlag,
TraceDisableReturnDataFlag,