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
27ab6536
Unverified
Commit
27ab6536
authored
Aug 22, 2023
by
mergify[bot]
Committed by
GitHub
Aug 22, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into indexer.eth.sends
parents
05f9c579
a4b72a4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
types.go
op-node/rollup/types.go
+4
-4
No files found.
op-node/rollup/types.go
View file @
27ab6536
...
...
@@ -139,7 +139,7 @@ type L1Client interface {
func
(
cfg
*
Config
)
CheckL1ChainID
(
ctx
context
.
Context
,
client
L1Client
)
error
{
id
,
err
:=
client
.
ChainID
(
ctx
)
if
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"failed to get L1 chain ID: %w"
,
err
)
}
if
cfg
.
L1ChainID
.
Cmp
(
id
)
!=
0
{
return
fmt
.
Errorf
(
"incorrect L1 RPC chain id %d, expected %d"
,
id
,
cfg
.
L1ChainID
)
...
...
@@ -151,7 +151,7 @@ func (cfg *Config) CheckL1ChainID(ctx context.Context, client L1Client) error {
func
(
cfg
*
Config
)
CheckL1GenesisBlockHash
(
ctx
context
.
Context
,
client
L1Client
)
error
{
l1GenesisBlockRef
,
err
:=
client
.
L1BlockRefByNumber
(
ctx
,
cfg
.
Genesis
.
L1
.
Number
)
if
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"failed to get L1 genesis blockhash: %w"
,
err
)
}
if
l1GenesisBlockRef
.
Hash
!=
cfg
.
Genesis
.
L1
.
Hash
{
return
fmt
.
Errorf
(
"incorrect L1 genesis block hash %s, expected %s"
,
l1GenesisBlockRef
.
Hash
,
cfg
.
Genesis
.
L1
.
Hash
)
...
...
@@ -168,7 +168,7 @@ type L2Client interface {
func
(
cfg
*
Config
)
CheckL2ChainID
(
ctx
context
.
Context
,
client
L2Client
)
error
{
id
,
err
:=
client
.
ChainID
(
ctx
)
if
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"failed to get L2 chain ID: %w"
,
err
)
}
if
cfg
.
L2ChainID
.
Cmp
(
id
)
!=
0
{
return
fmt
.
Errorf
(
"incorrect L2 RPC chain id %d, expected %d"
,
id
,
cfg
.
L2ChainID
)
...
...
@@ -180,7 +180,7 @@ func (cfg *Config) CheckL2ChainID(ctx context.Context, client L2Client) error {
func
(
cfg
*
Config
)
CheckL2GenesisBlockHash
(
ctx
context
.
Context
,
client
L2Client
)
error
{
l2GenesisBlockRef
,
err
:=
client
.
L2BlockRefByNumber
(
ctx
,
cfg
.
Genesis
.
L2
.
Number
)
if
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"failed to get L2 genesis blockhash: %w"
,
err
)
}
if
l2GenesisBlockRef
.
Hash
!=
cfg
.
Genesis
.
L2
.
Hash
{
return
fmt
.
Errorf
(
"incorrect L2 genesis block hash %s, expected %s"
,
l2GenesisBlockRef
.
Hash
,
cfg
.
Genesis
.
L2
.
Hash
)
...
...
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