Commit f20b92d3 authored by zhiqiangxu's avatar zhiqiangxu Committed by GitHub

optimize e2e setup a bit (#11585)

parent 978355d8
......@@ -607,6 +607,9 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste
}
for name := range cfg.Nodes {
if name == RoleL1 {
return nil, fmt.Errorf("node name %s is reserved for L1 node", RoleL1)
}
var ethClient services.EthInstance
if cfg.ExternalL2Shim == "" {
l2Geth, err := geth.InitL2(name, l2Genesis, cfg.JWTFilePath, cfg.GethOptions[name]...)
......@@ -638,9 +641,6 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste
for name, nodeCfg := range cfg.Nodes {
configureL1(nodeCfg, sys.EthInstances[RoleL1], sys.L1BeaconEndpoint())
configureL2(nodeCfg, sys.EthInstances[name], cfg.JWTSecret)
if sys.RollupConfig.EcotoneTime != nil {
nodeCfg.Beacon = &rollupNode.L1BeaconEndpointConfig{BeaconAddr: sys.L1BeaconAPIAddr.RestHTTP()}
}
}
l1Client := sys.NodeClient(RoleL1)
......
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