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
d2ef676d
Unverified
Commit
d2ef676d
authored
May 25, 2023
by
mergify[bot]
Committed by
GitHub
May 25, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into op-chain-ops/fix-strict-size-check
parents
8d79e795
33c01f4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
main.go
op-chain-ops/cmd/op-migrate/main.go
+13
-5
No files found.
op-chain-ops/cmd/op-migrate/main.go
View file @
d2ef676d
...
...
@@ -164,8 +164,14 @@ func main() {
l1RpcURL
:=
ctx
.
String
(
"l1-rpc-url"
)
l1Client
,
err
:=
ethclient
.
Dial
(
l1RpcURL
)
if
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"cannot dial L1 client: %w"
,
err
)
}
chainId
,
err
:=
l1Client
.
ChainID
(
context
.
Background
())
if
err
!=
nil
{
return
fmt
.
Errorf
(
"failed to get L1 ChainID: %w"
,
err
)
}
log
.
Info
(
"L1 ChainID"
,
"chainId"
,
chainId
)
var
block
*
types
.
Block
tag
:=
config
.
L1StartingBlockTag
...
...
@@ -181,14 +187,16 @@ func main() {
return
fmt
.
Errorf
(
"invalid l1StartingBlockTag in deploy config: %v"
,
tag
)
}
if
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"cannot fetch L1 starting block tag: %w"
,
err
)
}
dbCache
:=
ctx
.
Int
(
"db-cache"
)
dbHandles
:=
ctx
.
Int
(
"db-handles"
)
ldb
,
err
:=
db
.
Open
(
ctx
.
String
(
"db-path"
),
dbCache
,
dbHandles
)
dbPath
:=
ctx
.
String
(
"db-path"
)
log
.
Info
(
"Opening database"
,
"dbCache"
,
dbCache
,
"dbHandles"
,
dbHandles
,
"dbPath"
,
dbPath
)
ldb
,
err
:=
db
.
Open
(
dbPath
,
dbCache
,
dbHandles
)
if
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"cannot open DB: %w"
,
err
)
}
// Read the required deployment addresses from disk if required
...
...
@@ -217,7 +225,7 @@ func main() {
return
err
}
postLDB
,
err
:=
db
.
Open
(
ctx
.
String
(
"db-path"
)
,
dbCache
,
dbHandles
)
postLDB
,
err
:=
db
.
Open
(
dbPath
,
dbCache
,
dbHandles
)
if
err
!=
nil
{
return
err
}
...
...
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