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
5acb97e0
Unverified
Commit
5acb97e0
authored
Dec 02, 2022
by
mergify[bot]
Committed by
GitHub
Dec 02, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4160 from ethereum-optimism/feat/configurable-db-migrate
op-chain-ops: allow config of LevelDB in `op-migrate`
parents
014b91d2
cae1605e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
main.go
op-chain-ops/cmd/op-migrate/main.go
+14
-1
No files found.
op-chain-ops/cmd/op-migrate/main.go
View file @
5acb97e0
...
@@ -80,6 +80,16 @@ func main() {
...
@@ -80,6 +80,16 @@ func main() {
Name
:
"no-check"
,
Name
:
"no-check"
,
Usage
:
"Do not perform sanity checks. This should only be used for testing"
,
Usage
:
"Do not perform sanity checks. This should only be used for testing"
,
},
},
cli
.
IntFlag
{
Name
:
"db-cache"
,
Usage
:
"LevelDB cache size in mb"
,
Value
:
1024
,
},
cli
.
IntFlag
{
Name
:
"db-handles"
,
Usage
:
"LevelDB number of handles"
,
Value
:
60
,
},
},
},
Action
:
func
(
ctx
*
cli
.
Context
)
error
{
Action
:
func
(
ctx
*
cli
.
Context
)
error
{
deployConfig
:=
ctx
.
String
(
"deploy-config"
)
deployConfig
:=
ctx
.
String
(
"deploy-config"
)
...
@@ -140,9 +150,12 @@ func main() {
...
@@ -140,9 +150,12 @@ func main() {
return
err
return
err
}
}
dbCache
:=
ctx
.
Int
(
"db-cache"
)
dbHandles
:=
ctx
.
Int
(
"db-handles"
)
chaindataPath
:=
filepath
.
Join
(
ctx
.
String
(
"db-path"
),
"geth"
,
"chaindata"
)
chaindataPath
:=
filepath
.
Join
(
ctx
.
String
(
"db-path"
),
"geth"
,
"chaindata"
)
ancientPath
:=
filepath
.
Join
(
chaindataPath
,
"ancient"
)
ancientPath
:=
filepath
.
Join
(
chaindataPath
,
"ancient"
)
ldb
,
err
:=
rawdb
.
NewLevelDBDatabaseWithFreezer
(
chaindataPath
,
int
(
1024
),
int
(
60
)
,
ancientPath
,
""
,
false
)
ldb
,
err
:=
rawdb
.
NewLevelDBDatabaseWithFreezer
(
chaindataPath
,
dbCache
,
dbHandles
,
ancientPath
,
""
,
false
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
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