Commit e4d4cc17 authored by cui's avatar cui Committed by GitHub

refactor: using maps.Keys (#11570)

parent 33e925d3
......@@ -16,6 +16,8 @@ import (
"testing"
"time"
"golang.org/x/exp/maps"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/batcher"
ds "github.com/ipfs/go-datastore"
dsSync "github.com/ipfs/go-datastore/sync"
......@@ -772,10 +774,7 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste
// Rollup nodes
// Ensure we are looping through the nodes in alphabetical order
ks := make([]string, 0, len(cfg.Nodes))
for k := range cfg.Nodes {
ks = append(ks, k)
}
ks := maps.Keys(cfg.Nodes)
// Sort strings in ascending alphabetical order
sort.Strings(ks)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment