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

refactor: using maps.Keys (#11570)

parent 33e925d3
...@@ -16,6 +16,8 @@ import ( ...@@ -16,6 +16,8 @@ import (
"testing" "testing"
"time" "time"
"golang.org/x/exp/maps"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/batcher" "github.com/ethereum-optimism/optimism/op-e2e/e2eutils/batcher"
ds "github.com/ipfs/go-datastore" ds "github.com/ipfs/go-datastore"
dsSync "github.com/ipfs/go-datastore/sync" dsSync "github.com/ipfs/go-datastore/sync"
...@@ -772,10 +774,7 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste ...@@ -772,10 +774,7 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste
// Rollup nodes // Rollup nodes
// Ensure we are looping through the nodes in alphabetical order // Ensure we are looping through the nodes in alphabetical order
ks := make([]string, 0, len(cfg.Nodes)) ks := maps.Keys(cfg.Nodes)
for k := range cfg.Nodes {
ks = append(ks, k)
}
// Sort strings in ascending alphabetical order // Sort strings in ascending alphabetical order
sort.Strings(ks) 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