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
1b87e2b4
Unverified
Commit
1b87e2b4
authored
Jul 26, 2023
by
Mark Tyneway
Committed by
GitHub
Jul 26, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6292 from bobanetwork/op-e2e-testbatchermultitx-resiliency
op-e2e: make TestBatcherMultiTx more resilient
parents
90111ed7
84442b17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
system_test.go
op-e2e/system_test.go
+11
-12
No files found.
op-e2e/system_test.go
View file @
1b87e2b4
...
...
@@ -1351,22 +1351,21 @@ func TestBatcherMultiTx(t *testing.T) {
err
=
sys
.
BatchSubmitter
.
Start
()
require
.
Nil
(
t
,
err
)
// wait for 3 L1 blocks
_
,
err
=
waitForBlock
(
big
.
NewInt
(
int64
(
l1Number
)
+
3
),
l1Client
,
time
.
Duration
(
cfg
.
DeployConfig
.
L1BlockTime
*
5
)
*
time
.
Second
)
require
.
Nil
(
t
,
err
,
"Waiting for l1 blocks"
)
// count the number of transactions submitted to L1 in the last 3 blocks
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
10
*
time
.
Second
)
defer
cancel
()
totalTxCount
:=
0
for
i
:=
int64
(
0
);
i
<
3
;
i
++
{
block
,
err
:=
l1Client
.
BlockByNumber
(
ctx
,
big
.
NewInt
(
int64
(
l1Number
)
+
i
+
1
))
require
.
Nil
(
t
,
err
)
// wait for up to 10 L1 blocks, usually only 3 is required, but it's
// possible additional L1 blocks will be created before the batcher starts,
// so we wait additional blocks.
for
i
:=
int64
(
0
);
i
<
10
;
i
++
{
block
,
err
:=
waitForBlock
(
big
.
NewInt
(
int64
(
l1Number
)
+
i
),
l1Client
,
time
.
Duration
(
cfg
.
DeployConfig
.
L1BlockTime
*
5
)
*
time
.
Second
)
require
.
Nil
(
t
,
err
,
"Waiting for l1 blocks"
)
totalTxCount
+=
len
(
block
.
Transactions
())
if
totalTxCount
>=
10
{
return
}
}
// expect at least 10 batcher transactions, given 10 L2 blocks were generated above
require
.
GreaterOrEqual
(
t
,
totalTxCount
,
10
)
t
.
Fatal
(
"Expected at least 10 transactions from the batcher"
)
}
func
safeAddBig
(
a
*
big
.
Int
,
b
*
big
.
Int
)
*
big
.
Int
{
...
...
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