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
d92ac9b1
Unverified
Commit
d92ac9b1
authored
Jul 25, 2023
by
Adrian Sutton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-e2e: Use correct receipt when waiting for withdrawal finalization.
parent
da9c9585
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
bridge_e2e_test.go
indexer/e2e_test/bridge_e2e_test.go
+1
-1
withdrawal_helper.go
op-e2e/withdrawal_helper.go
+2
-2
No files found.
indexer/e2e_test/bridge_e2e_test.go
View file @
d92ac9b1
...
...
@@ -167,7 +167,7 @@ func TestE2EBridge(t *testing.T) {
// (3) Test Withdrawal Finalization
// finalize & wait for processor catchup
finalizeReceipt
:=
op_e2e
.
FinalizeWithdrawal
(
t
,
*
testSuite
.
OpCfg
,
l1Client
,
testSuite
.
OpCfg
.
Secrets
.
Alice
,
withdrawal
Receipt
,
withdrawParams
)
finalizeReceipt
:=
op_e2e
.
FinalizeWithdrawal
(
t
,
*
testSuite
.
OpCfg
,
l1Client
,
testSuite
.
OpCfg
.
Secrets
.
Alice
,
prove
Receipt
,
withdrawParams
)
require
.
NoError
(
t
,
utils
.
WaitFor
(
testCtx
,
500
*
time
.
Millisecond
,
func
()
(
bool
,
error
)
{
l1Header
:=
testSuite
.
Indexer
.
L1Processor
.
LatestProcessedHeader
()
return
l1Header
!=
nil
&&
l1Header
.
Number
.
Uint64
()
>=
finalizeReceipt
.
BlockNumber
.
Uint64
(),
nil
...
...
op-e2e/withdrawal_helper.go
View file @
d92ac9b1
...
...
@@ -139,11 +139,11 @@ func ProveWithdrawal(t *testing.T, cfg SystemConfig, l1Client *ethclient.Client,
return
params
,
proveReceipt
}
func
FinalizeWithdrawal
(
t
*
testing
.
T
,
cfg
SystemConfig
,
l1Client
*
ethclient
.
Client
,
privKey
*
ecdsa
.
PrivateKey
,
withdrawalReceipt
*
types
.
Receipt
,
params
withdrawals
.
ProvenWithdrawalParameters
)
*
types
.
Receipt
{
func
FinalizeWithdrawal
(
t
*
testing
.
T
,
cfg
SystemConfig
,
l1Client
*
ethclient
.
Client
,
privKey
*
ecdsa
.
PrivateKey
,
withdrawal
Proof
Receipt
*
types
.
Receipt
,
params
withdrawals
.
ProvenWithdrawalParameters
)
*
types
.
Receipt
{
// Wait for finalization and then create the Finalized Withdrawal Transaction
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Duration
(
cfg
.
DeployConfig
.
L1BlockTime
)
*
time
.
Second
)
defer
cancel
()
err
:=
withdrawals
.
WaitForFinalizationPeriod
(
ctx
,
l1Client
,
predeploys
.
DevOptimismPortalAddr
,
withdrawalReceipt
.
BlockNumber
)
err
:=
withdrawals
.
WaitForFinalizationPeriod
(
ctx
,
l1Client
,
predeploys
.
DevOptimismPortalAddr
,
withdrawal
Proof
Receipt
.
BlockNumber
)
require
.
Nil
(
t
,
err
)
opts
,
err
:=
bind
.
NewKeyedTransactorWithChainID
(
privKey
,
cfg
.
L1ChainIDBig
())
...
...
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