Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
7457c568
Unverified
Commit
7457c568
authored
Dec 03, 2024
by
clabby
Committed by
GitHub
Dec 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(op-challenger): Add `TraceTypeAsteriscKona` to default `--trace-type` option (#13208)
parent
56670a73
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
main_test.go
op-challenger/cmd/main_test.go
+19
-3
flags.go
op-challenger/flags/flags.go
+1
-1
No files found.
op-challenger/cmd/main_test.go
View file @
7457c568
...
...
@@ -90,9 +90,9 @@ func TestL1Beacon(t *testing.T) {
func
TestTraceType
(
t
*
testing
.
T
)
{
t
.
Run
(
"Default"
,
func
(
t
*
testing
.
T
)
{
expectedDefault
:=
types
.
TraceTypeCannon
cfg
:=
configForArgs
(
t
,
addRequiredArgsExcept
(
expectedDefault
,
"--trace-type"
))
require
.
Equal
(
t
,
[]
types
.
TraceType
{
expectedDefault
}
,
cfg
.
TraceTypes
)
expectedDefault
:=
[]
types
.
TraceType
{
types
.
TraceTypeCannon
,
types
.
TraceTypeAsteriscKona
}
cfg
:=
configForArgs
(
t
,
addRequiredArgs
ForMultipleTraces
Except
(
expectedDefault
,
"--trace-type"
))
require
.
Equal
(
t
,
expectedDefault
,
cfg
.
TraceTypes
)
})
for
_
,
traceType
:=
range
types
.
TraceTypes
{
...
...
@@ -995,6 +995,12 @@ func addRequiredArgsExcept(traceType types.TraceType, name string, optionalArgs
return
append
(
toArgList
(
req
),
optionalArgs
...
)
}
func
addRequiredArgsForMultipleTracesExcept
(
traceType
[]
types
.
TraceType
,
name
string
,
optionalArgs
...
string
)
[]
string
{
req
:=
requiredArgsMultiple
(
traceType
)
delete
(
req
,
name
)
return
append
(
toArgList
(
req
),
optionalArgs
...
)
}
func
addRequiredArgsExceptArr
(
traceType
types
.
TraceType
,
names
[]
string
,
optionalArgs
...
string
)
[]
string
{
req
:=
requiredArgs
(
traceType
)
for
_
,
name
:=
range
names
{
...
...
@@ -1003,6 +1009,16 @@ func addRequiredArgsExceptArr(traceType types.TraceType, names []string, optiona
return
append
(
toArgList
(
req
),
optionalArgs
...
)
}
func
requiredArgsMultiple
(
traceType
[]
types
.
TraceType
)
map
[
string
]
string
{
args
:=
make
(
map
[
string
]
string
)
for
_
,
t
:=
range
traceType
{
for
name
,
value
:=
range
requiredArgs
(
t
)
{
args
[
name
]
=
value
}
}
return
args
}
func
requiredArgs
(
traceType
types
.
TraceType
)
map
[
string
]
string
{
args
:=
map
[
string
]
string
{
"--l1-eth-rpc"
:
l1EthRpc
,
...
...
op-challenger/flags/flags.go
View file @
7457c568
...
...
@@ -65,7 +65,7 @@ var (
Name
:
"trace-type"
,
Usage
:
"The trace types to support. Valid options: "
+
openum
.
EnumString
(
types
.
TraceTypes
),
EnvVars
:
prefixEnvVars
(
"TRACE_TYPE"
),
Value
:
cli
.
NewStringSlice
(
types
.
TraceTypeCannon
.
String
()),
Value
:
cli
.
NewStringSlice
(
types
.
TraceTypeCannon
.
String
()
,
types
.
TraceTypeAsteriscKona
.
String
()
),
}
DatadirFlag
=
&
cli
.
StringFlag
{
Name
:
"datadir"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment