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
e2b70c12
Unverified
Commit
e2b70c12
authored
May 18, 2021
by
Mark Tyneway
Committed by
GitHub
May 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l2geth: remove miner panic (#915)
parent
1bd79659
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
little-emus-cover.md
.changeset/little-emus-cover.md
+5
-0
worker.go
l2geth/miner/worker.go
+5
-4
No files found.
.changeset/little-emus-cover.md
0 → 100644
View file @
e2b70c12
---
'
@eth-optimism/l2geth'
:
patch
---
Don't panic on a monotonicity violation
l2geth/miner/worker.go
View file @
e2b70c12
...
@@ -872,12 +872,13 @@ func (w *worker) commitNewTx(tx *types.Transaction) error {
...
@@ -872,12 +872,13 @@ func (w *worker) commitNewTx(tx *types.Transaction) error {
if
tx
.
QueueOrigin
()
.
Uint64
()
==
uint64
(
types
.
QueueOriginSequencer
)
{
if
tx
.
QueueOrigin
()
.
Uint64
()
==
uint64
(
types
.
QueueOriginSequencer
)
{
tx
.
SetL1Timestamp
(
parent
.
Time
())
tx
.
SetL1Timestamp
(
parent
.
Time
())
prev
:=
parent
.
Transactions
()
prev
:=
parent
.
Transactions
()
if
len
(
prev
)
!=
1
{
if
len
(
prev
)
==
1
{
panic
(
"Cannot recover L1BlockNumber"
)
tx
.
SetL1BlockNumber
(
prev
[
0
]
.
L1BlockNumber
()
.
Uint64
())
}
else
{
log
.
Error
(
"Cannot recover L1 Blocknumber"
)
}
}
tx
.
SetL1BlockNumber
(
prev
[
0
]
.
L1BlockNumber
()
.
Uint64
())
}
else
{
}
else
{
panic
(
"M
onotonicity violation"
)
log
.
Error
(
"Cannot recover from m
onotonicity violation"
)
}
}
}
}
...
...
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