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
743aefb6
Commit
743aefb6
authored
Jan 17, 2023
by
clabby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix copy pasta error; :broom:
rip
parent
a4cff0f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
system_config.go
op-node/rollup/derive/system_config.go
+8
-6
No files found.
op-node/rollup/derive/system_config.go
View file @
743aefb6
...
@@ -31,6 +31,8 @@ var (
...
@@ -31,6 +31,8 @@ var (
var
(
var
(
// A left-padded uint256 equal to 32.
// A left-padded uint256 equal to 32.
OneWordUint
=
common
.
Hash
{
31
:
32
}
OneWordUint
=
common
.
Hash
{
31
:
32
}
// A left-padded uint256 equal to 64.
TwoWordUint
=
common
.
Hash
{
31
:
64
}
// 24 zero bytes (the padding for a uint64 in a 32 byte word)
// 24 zero bytes (the padding for a uint64 in a 32 byte word)
Uint64Padding
=
make
([]
byte
,
24
)
Uint64Padding
=
make
([]
byte
,
24
)
// 12 zero bytes (the padding for an Ethereum address in a 32 byte word)
// 12 zero bytes (the padding for an Ethereum address in a 32 byte word)
...
@@ -103,12 +105,12 @@ func ProcessSystemConfigUpdateLogEvent(destSysCfg *eth.SystemConfig, ev *types.L
...
@@ -103,12 +105,12 @@ func ProcessSystemConfigUpdateLogEvent(destSysCfg *eth.SystemConfig, ev *types.L
}
}
// Read the pointer, it should always equal 32.
// Read the pointer, it should always equal 32.
if
word
:=
readWord
();
common
.
BytesToHash
(
word
[
:
])
!=
OneWordUint
{
if
word
:=
readWord
();
word
!=
OneWordUint
{
return
fmt
.
Errorf
(
"expected offset to point to length location, but got %s"
,
word
)
return
fmt
.
Errorf
(
"expected offset to point to length location, but got %s"
,
word
)
}
}
// Read the length, it should also always equal 32.
// Read the length, it should also always equal 32.
if
word
:=
readWord
();
common
.
BytesToHash
(
word
[
:
])
!=
OneWordUint
{
if
word
:=
readWord
();
word
!=
OneWordUint
{
return
fmt
.
Errorf
(
"expected length to be 32 bytes, but got %s"
,
word
)
return
fmt
.
Errorf
(
"expected length to be 32 bytes, but got %s"
,
word
)
}
}
...
@@ -126,12 +128,12 @@ func ProcessSystemConfigUpdateLogEvent(destSysCfg *eth.SystemConfig, ev *types.L
...
@@ -126,12 +128,12 @@ func ProcessSystemConfigUpdateLogEvent(destSysCfg *eth.SystemConfig, ev *types.L
}
}
// Read the pointer, it should always equal 32.
// Read the pointer, it should always equal 32.
if
word
:=
readWord
();
common
.
BytesToHash
(
word
[
:
])
!=
OneWordUint
{
if
word
:=
readWord
();
word
!=
OneWordUint
{
return
fmt
.
Errorf
(
"expected offset to point to length location, but got %s"
,
word
)
return
fmt
.
Errorf
(
"expected offset to point to length location, but got %s"
,
word
)
}
}
// Read the length, it should always equal 64.
// Read the length, it should always equal 64.
if
word
:=
readWord
();
common
.
BytesToHash
(
word
[
:
])
!=
One
WordUint
{
if
word
:=
readWord
();
word
!=
Two
WordUint
{
return
fmt
.
Errorf
(
"expected length to be 64 bytes, but got %s"
,
word
)
return
fmt
.
Errorf
(
"expected length to be 64 bytes, but got %s"
,
word
)
}
}
...
@@ -145,12 +147,12 @@ func ProcessSystemConfigUpdateLogEvent(destSysCfg *eth.SystemConfig, ev *types.L
...
@@ -145,12 +147,12 @@ func ProcessSystemConfigUpdateLogEvent(destSysCfg *eth.SystemConfig, ev *types.L
}
}
// Read the pointer, it should always equal 32.
// Read the pointer, it should always equal 32.
if
word
:=
readWord
();
common
.
BytesToHash
(
word
[
:
])
!=
OneWordUint
{
if
word
:=
readWord
();
word
!=
OneWordUint
{
return
fmt
.
Errorf
(
"expected offset to point to length location, but got %s"
,
word
)
return
fmt
.
Errorf
(
"expected offset to point to length location, but got %s"
,
word
)
}
}
// Read the length, it should also always equal 32.
// Read the length, it should also always equal 32.
if
word
:=
readWord
();
common
.
BytesToHash
(
word
[
:
])
!=
OneWordUint
{
if
word
:=
readWord
();
word
!=
OneWordUint
{
return
fmt
.
Errorf
(
"expected length to be 32 bytes, but got %s"
,
word
)
return
fmt
.
Errorf
(
"expected length to be 32 bytes, but got %s"
,
word
)
}
}
...
...
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