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
90848b23
Unverified
Commit
90848b23
authored
Nov 03, 2023
by
protolambda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-e2e/actions: use interface in batcher for l2 block ref access
parent
d3bf13b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
l2_batcher.go
op-e2e/actions/l2_batcher.go
+6
-3
No files found.
op-e2e/actions/l2_batcher.go
View file @
90848b23
...
@@ -20,7 +20,6 @@ import (
...
@@ -20,7 +20,6 @@ import (
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum-optimism/optimism/op-service/sources"
)
)
type
SyncStatusAPI
interface
{
type
SyncStatusAPI
interface
{
...
@@ -47,6 +46,10 @@ type BatcherCfg struct {
...
@@ -47,6 +46,10 @@ type BatcherCfg struct {
GarbageCfg
*
GarbageChannelCfg
GarbageCfg
*
GarbageChannelCfg
}
}
type
L2BlockRefs
interface
{
L2BlockRefByHash
(
ctx
context
.
Context
,
hash
common
.
Hash
)
(
eth
.
L2BlockRef
,
error
)
}
// L2Batcher buffers and submits L2 batches to L1.
// L2Batcher buffers and submits L2 batches to L1.
//
//
// TODO: note the batcher shares little logic/state with actual op-batcher,
// TODO: note the batcher shares little logic/state with actual op-batcher,
...
@@ -60,7 +63,7 @@ type L2Batcher struct {
...
@@ -60,7 +63,7 @@ type L2Batcher struct {
syncStatusAPI
SyncStatusAPI
syncStatusAPI
SyncStatusAPI
l2
BlocksAPI
l2
BlocksAPI
l1
L1TxAPI
l1
L1TxAPI
engCl
*
sources
.
EngineClient
engCl
L2BlockRefs
l1Signer
types
.
Signer
l1Signer
types
.
Signer
...
@@ -72,7 +75,7 @@ type L2Batcher struct {
...
@@ -72,7 +75,7 @@ type L2Batcher struct {
batcherAddr
common
.
Address
batcherAddr
common
.
Address
}
}
func
NewL2Batcher
(
log
log
.
Logger
,
rollupCfg
*
rollup
.
Config
,
batcherCfg
*
BatcherCfg
,
api
SyncStatusAPI
,
l1
L1TxAPI
,
l2
BlocksAPI
,
engCl
*
sources
.
EngineClient
)
*
L2Batcher
{
func
NewL2Batcher
(
log
log
.
Logger
,
rollupCfg
*
rollup
.
Config
,
batcherCfg
*
BatcherCfg
,
api
SyncStatusAPI
,
l1
L1TxAPI
,
l2
BlocksAPI
,
engCl
L2BlockRefs
)
*
L2Batcher
{
return
&
L2Batcher
{
return
&
L2Batcher
{
log
:
log
,
log
:
log
,
rollupCfg
:
rollupCfg
,
rollupCfg
:
rollupCfg
,
...
...
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