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
713d950a
Commit
713d950a
authored
Nov 13, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-node: cleanup genesis generation script
parent
9be8666f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
cmd.go
op-node/cmd/genesis/cmd.go
+4
-4
No files found.
op-node/cmd/genesis/cmd.go
View file @
713d950a
...
...
@@ -196,7 +196,7 @@ var Subcommands = cli.Commands{
}
if
l1RPC
!=
""
{
client
,
err
:=
ethclient
.
Dial
(
ctx
.
String
(
"l1-rpc"
)
)
client
,
err
:=
ethclient
.
Dial
(
l1RPC
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"cannot dial %s: %w"
,
l1RPC
,
err
)
}
...
...
@@ -204,19 +204,19 @@ var Subcommands = cli.Commands{
if
config
.
L1StartingBlockTag
==
nil
{
l1StartBlock
,
err
=
client
.
BlockByNumber
(
context
.
Background
(),
nil
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"%w"
,
err
)
return
fmt
.
Errorf
(
"
cannot fetch latest block:
%w"
,
err
)
}
tag
:=
rpc
.
BlockNumberOrHashWithHash
(
l1StartBlock
.
Hash
(),
true
)
config
.
L1StartingBlockTag
=
(
*
genesis
.
MarshalableRPCBlockNumberOrHash
)(
&
tag
)
}
else
if
config
.
L1StartingBlockTag
.
BlockHash
!=
nil
{
l1StartBlock
,
err
=
client
.
BlockByHash
(
context
.
Background
(),
*
config
.
L1StartingBlockTag
.
BlockHash
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"%w"
,
err
)
return
fmt
.
Errorf
(
"
cannot fetch block by hash:
%w"
,
err
)
}
}
else
if
config
.
L1StartingBlockTag
.
BlockNumber
!=
nil
{
l1StartBlock
,
err
=
client
.
BlockByNumber
(
context
.
Background
(),
big
.
NewInt
(
config
.
L1StartingBlockTag
.
BlockNumber
.
Int64
()))
if
err
!=
nil
{
return
fmt
.
Errorf
(
"%w"
,
err
)
return
fmt
.
Errorf
(
"
cannot fetch block by number:
%w"
,
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