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
808bc8bd
Commit
808bc8bd
authored
Jul 17, 2023
by
Hamdi Allam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nits
parent
0b275cfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
e2e_test.go
indexer/e2e_test/e2e_test.go
+5
-5
No files found.
indexer/e2e_test/e2e_test.go
View file @
808bc8bd
...
...
@@ -29,7 +29,7 @@ func TestE2E(t *testing.T) {
setupCtx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
time
.
Minute
)
defer
cancel
()
// wait for at least 10 L2 blocks to be created &
finaliz
ed on L1
// wait for at least 10 L2 blocks to be created &
post
ed on L1
require
.
NoError
(
t
,
e2eutils
.
WaitFor
(
setupCtx
,
time
.
Second
,
func
()
(
bool
,
error
)
{
l2Height
,
err
:=
l2OutputOracle
.
LatestBlockNumber
(
&
bind
.
CallOpts
{
Context
:
setupCtx
})
return
l2Height
!=
nil
&&
l2Height
.
Uint64
()
>=
9
,
err
...
...
@@ -80,19 +80,19 @@ func TestE2E(t *testing.T) {
submissionInterval
:=
testSuite
.
OpCfg
.
DeployConfig
.
L2OutputOracleSubmissionInterval
numOutputs
:=
latestOutput
.
L2BlockNumber
.
Int
.
Uint64
()
/
submissionInterval
for
i
:=
int64
(
0
);
i
<
int64
(
numOutputs
);
i
++
{
expectedB
lockNumber
:=
big
.
NewInt
((
i
+
1
)
*
int64
(
submissionInterval
))
b
lockNumber
:=
big
.
NewInt
((
i
+
1
)
*
int64
(
submissionInterval
))
output
,
err
:=
testSuite
.
DB
.
Blocks
.
OutputProposal
(
big
.
NewInt
(
i
))
require
.
NoError
(
t
,
err
)
require
.
NotNil
(
t
,
output
)
require
.
Equal
(
t
,
i
,
output
.
L2OutputIndex
.
Int
.
Int64
())
require
.
Equal
(
t
,
expectedB
lockNumber
,
output
.
L2BlockNumber
.
Int
)
require
.
Equal
(
t
,
b
lockNumber
,
output
.
L2BlockNumber
.
Int
)
require
.
NotEmpty
(
t
,
output
.
L1ContractEventGUID
)
// we may as well check the integrity of the output root
l2Block
,
err
:=
l2Client
.
BlockByNumber
(
context
.
Background
(),
expectedB
lockNumber
)
l2Block
,
err
:=
l2Client
.
BlockByNumber
(
context
.
Background
(),
b
lockNumber
)
require
.
NoError
(
t
,
err
)
messagePasserStorageHash
,
err
:=
l2EthClient
.
StorageHash
(
predeploys
.
L2ToL1MessagePasserAddr
,
expectedB
lockNumber
)
messagePasserStorageHash
,
err
:=
l2EthClient
.
StorageHash
(
predeploys
.
L2ToL1MessagePasserAddr
,
b
lockNumber
)
require
.
NoError
(
t
,
err
)
// construct and check output root
...
...
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