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
7005d12c
Commit
7005d12c
authored
Oct 31, 2023
by
Tei Im
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix TestStopStartBatcher to wait for processing full batch
parent
8f59b112
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
blocks.go
op-e2e/e2eutils/wait/blocks.go
+11
-0
system_test.go
op-e2e/system_test.go
+2
-0
No files found.
op-e2e/e2eutils/wait/blocks.go
View file @
7005d12c
...
...
@@ -6,6 +6,8 @@ import (
"math/big"
"time"
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum-optimism/optimism/op-service/sources"
"github.com/ethereum/go-ethereum/core/types"
)
...
...
@@ -57,3 +59,12 @@ func ForNextBlock(ctx context.Context, client BlockCaller) error {
}
return
ForBlock
(
ctx
,
client
,
current
+
1
)
}
func
ForProcessingFullBatch
(
ctx
context
.
Context
,
rollupCl
*
sources
.
RollupClient
)
error
{
_
,
err
:=
AndGet
(
ctx
,
time
.
Second
,
func
()
(
*
eth
.
SyncStatus
,
error
)
{
return
rollupCl
.
SyncStatus
(
ctx
)
},
func
(
syncStatus
*
eth
.
SyncStatus
)
bool
{
return
syncStatus
.
PendingSafeL2
==
syncStatus
.
SafeL2
})
return
err
}
op-e2e/system_test.go
View file @
7005d12c
...
...
@@ -1259,6 +1259,7 @@ func TestStopStartBatcher(t *testing.T) {
safeBlockInclusionDuration
:=
time
.
Duration
(
6
*
cfg
.
DeployConfig
.
L1BlockTime
)
*
time
.
Second
_
,
err
=
geth
.
WaitForBlock
(
receipt
.
BlockNumber
,
l2Verif
,
safeBlockInclusionDuration
)
require
.
Nil
(
t
,
err
,
"Waiting for block on verifier"
)
require
.
NoError
(
t
,
wait
.
ForProcessingFullBatch
(
context
.
Background
(),
rollupClient
))
// ensure the safe chain advances
newSeqStatus
,
err
:=
rollupClient
.
SyncStatus
(
context
.
Background
())
...
...
@@ -1296,6 +1297,7 @@ func TestStopStartBatcher(t *testing.T) {
// wait until the block the tx was first included in shows up in the safe chain on the verifier
_
,
err
=
geth
.
WaitForBlock
(
receipt
.
BlockNumber
,
l2Verif
,
safeBlockInclusionDuration
)
require
.
Nil
(
t
,
err
,
"Waiting for block on verifier"
)
require
.
NoError
(
t
,
wait
.
ForProcessingFullBatch
(
context
.
Background
(),
rollupClient
))
// ensure that the safe chain advances after restarting the batcher
newSeqStatus
,
err
=
rollupClient
.
SyncStatus
(
context
.
Background
())
...
...
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