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
be436515
Commit
be436515
authored
Sep 27, 2023
by
cby3149
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove L2RpcClient
parent
6242cf30
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
op_geth.go
op-e2e/op_geth.go
+1
-7
op_geth_test.go
op-e2e/op_geth_test.go
+1
-1
No files found.
op-e2e/op_geth.go
View file @
be436515
...
@@ -41,7 +41,6 @@ type OpGeth struct {
...
@@ -41,7 +41,6 @@ type OpGeth struct {
node
EthInstance
node
EthInstance
l2Engine
*
sources
.
EngineClient
l2Engine
*
sources
.
EngineClient
L2Client
*
ethclient
.
Client
L2Client
*
ethclient
.
Client
L2RpcClient
*
rpc
.
Client
SystemConfig
eth
.
SystemConfig
SystemConfig
eth
.
SystemConfig
L1ChainConfig
*
params
.
ChainConfig
L1ChainConfig
*
params
.
ChainConfig
L2ChainConfig
*
params
.
ChainConfig
L2ChainConfig
*
params
.
ChainConfig
...
@@ -82,7 +81,7 @@ func NewOpGeth(t *testing.T, ctx context.Context, cfg *SystemConfig) (*OpGeth, e
...
@@ -82,7 +81,7 @@ func NewOpGeth(t *testing.T, ctx context.Context, cfg *SystemConfig) (*OpGeth, e
node
=
gethNode
node
=
gethNode
}
else
{
}
else
{
externalNode
:=
(
&
ExternalRunner
{
externalNode
:=
(
&
ExternalRunner
{
Name
:
"
Sequencer
"
,
Name
:
"
l2
"
,
BinPath
:
cfg
.
ExternalL2Shim
,
BinPath
:
cfg
.
ExternalL2Shim
,
Genesis
:
l2Genesis
,
Genesis
:
l2Genesis
,
JWTPath
:
cfg
.
JWTFilePath
,
JWTPath
:
cfg
.
JWTFilePath
,
...
@@ -106,16 +105,12 @@ func NewOpGeth(t *testing.T, ctx context.Context, cfg *SystemConfig) (*OpGeth, e
...
@@ -106,16 +105,12 @@ func NewOpGeth(t *testing.T, ctx context.Context, cfg *SystemConfig) (*OpGeth, e
l2Client
,
err
:=
ethclient
.
Dial
(
node
.
HTTPEndpoint
())
l2Client
,
err
:=
ethclient
.
Dial
(
node
.
HTTPEndpoint
())
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
l2RpcClient
,
err
:=
rpc
.
Dial
(
node
.
HTTPEndpoint
())
require
.
Nil
(
t
,
err
)
genesisPayload
,
err
:=
eth
.
BlockAsPayload
(
l2GenesisBlock
)
genesisPayload
,
err
:=
eth
.
BlockAsPayload
(
l2GenesisBlock
)
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
return
&
OpGeth
{
return
&
OpGeth
{
node
:
node
,
node
:
node
,
L2Client
:
l2Client
,
L2Client
:
l2Client
,
L2RpcClient
:
l2RpcClient
,
l2Engine
:
l2Engine
,
l2Engine
:
l2Engine
,
SystemConfig
:
rollupGenesis
.
SystemConfig
,
SystemConfig
:
rollupGenesis
.
SystemConfig
,
L1ChainConfig
:
l1Genesis
.
Config
,
L1ChainConfig
:
l1Genesis
.
Config
,
...
@@ -129,7 +124,6 @@ func (d *OpGeth) Close() {
...
@@ -129,7 +124,6 @@ func (d *OpGeth) Close() {
_
=
d
.
node
.
Close
()
_
=
d
.
node
.
Close
()
d
.
l2Engine
.
Close
()
d
.
l2Engine
.
Close
()
d
.
L2Client
.
Close
()
d
.
L2Client
.
Close
()
d
.
L2RpcClient
.
Close
()
}
}
// AddL2Block Appends a new L2 block to the current chain including the specified transactions
// AddL2Block Appends a new L2 block to the current chain including the specified transactions
...
...
op-e2e/op_geth_test.go
View file @
be436515
...
@@ -163,7 +163,7 @@ func TestGethOnlyPendingBlockIsLatest(t *testing.T) {
...
@@ -163,7 +163,7 @@ func TestGethOnlyPendingBlockIsLatest(t *testing.T) {
Pending
hexutil
.
Uint64
`json:"pending"`
Pending
hexutil
.
Uint64
`json:"pending"`
}
}
for
i
:=
0
;
i
<
5
;
i
++
{
for
i
:=
0
;
i
<
5
;
i
++
{
require
.
NoError
(
t
,
opGeth
.
L2
RpcClient
.
CallContext
(
ctx
,
&
txPoolStatus
,
"txpool_status"
))
require
.
NoError
(
t
,
opGeth
.
L2
Client
.
Client
()
.
Call
(
&
txPoolStatus
,
"txpool_status"
))
if
txPoolStatus
.
Pending
==
0
{
if
txPoolStatus
.
Pending
==
0
{
time
.
Sleep
(
time
.
Second
)
time
.
Sleep
(
time
.
Second
)
}
else
{
}
else
{
...
...
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