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
23fc5ad4
Unverified
Commit
23fc5ad4
authored
Aug 28, 2023
by
Adrian Sutton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-challenger: Use NewConfig helper in e2e tests
parent
91fcf5f2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
helper.go
op-e2e/e2eutils/challenger/helper.go
+9
-12
No files found.
op-e2e/e2eutils/challenger/helper.go
View file @
23fc5ad4
...
@@ -17,7 +17,6 @@ import (
...
@@ -17,7 +17,6 @@ import (
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/wait"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/wait"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/testlog"
"github.com/ethereum-optimism/optimism/op-node/testlog"
"github.com/ethereum-optimism/optimism/op-service/txmgr"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/log"
...
@@ -120,18 +119,16 @@ func NewChallenger(t *testing.T, ctx context.Context, l1Endpoint string, name st
...
@@ -120,18 +119,16 @@ func NewChallenger(t *testing.T, ctx context.Context, l1Endpoint string, name st
}
}
func
NewChallengerConfig
(
t
*
testing
.
T
,
l1Endpoint
string
,
options
...
Option
)
*
config
.
Config
{
func
NewChallengerConfig
(
t
*
testing
.
T
,
l1Endpoint
string
,
options
...
Option
)
*
config
.
Config
{
txmgrCfg
:=
txmgr
.
NewCLIConfig
(
l1Endpoint
)
// Use the NewConfig method to ensure we pick up any defaults that are set.
txmgrCfg
.
NumConfirmations
=
1
cfg
:=
config
.
NewConfig
(
common
.
Address
{},
l1Endpoint
,
config
.
TraceTypeAlphabet
,
true
,
t
.
TempDir
())
txmgrCfg
.
ReceiptQueryInterval
=
1
*
time
.
Second
cfg
.
TxMgrConfig
.
NumConfirmations
=
1
cfg
:=
&
config
.
Config
{
cfg
.
TxMgrConfig
.
ReceiptQueryInterval
=
1
*
time
.
Second
L1EthRpc
:
l1Endpoint
,
if
cfg
.
MaxConcurrency
>
4
{
AlphabetTrace
:
""
,
// Limit concurrency to something more reasonable when there are also multiple tests executing in parallel
AgreeWithProposedOutput
:
true
,
cfg
.
MaxConcurrency
=
4
TxMgrConfig
:
txmgrCfg
,
Datadir
:
t
.
TempDir
(),
}
}
for
_
,
option
:=
range
options
{
for
_
,
option
:=
range
options
{
option
(
cfg
)
option
(
&
cfg
)
}
}
require
.
NotEmpty
(
t
,
cfg
.
TxMgrConfig
.
PrivateKey
,
"Missing private key for TxMgrConfig"
)
require
.
NotEmpty
(
t
,
cfg
.
TxMgrConfig
.
PrivateKey
,
"Missing private key for TxMgrConfig"
)
require
.
NoError
(
t
,
cfg
.
Check
(),
"op-challenger config should be valid"
)
require
.
NoError
(
t
,
cfg
.
Check
(),
"op-challenger config should be valid"
)
...
@@ -148,7 +145,7 @@ func NewChallengerConfig(t *testing.T, l1Endpoint string, options ...Option) *co
...
@@ -148,7 +145,7 @@ func NewChallengerConfig(t *testing.T, l1Endpoint string, options ...Option) *co
_
,
err
:=
os
.
Stat
(
cfg
.
CannonAbsolutePreState
)
_
,
err
:=
os
.
Stat
(
cfg
.
CannonAbsolutePreState
)
require
.
NoError
(
t
,
err
,
"cannon pre-state should be built. Make sure you've run make cannon-prestate"
)
require
.
NoError
(
t
,
err
,
"cannon pre-state should be built. Make sure you've run make cannon-prestate"
)
}
}
return
cfg
return
&
cfg
}
}
func
(
h
*
Helper
)
Close
()
error
{
func
(
h
*
Helper
)
Close
()
error
{
...
...
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