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
1bcee8f1
Unverified
Commit
1bcee8f1
authored
May 01, 2022
by
Mark Tyneway
Committed by
GitHub
May 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l2geth: fix `eth_getBlockRange` (#2390)
parent
cc0594cf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
fast-actors-allow.md
.changeset/fast-actors-allow.md
+5
-0
api.go
l2geth/internal/ethapi/api.go
+7
-3
No files found.
.changeset/fast-actors-allow.md
0 → 100644
View file @
1bcee8f1
---
'
@eth-optimism/l2geth'
:
patch
---
Fix
`eth_getBlockRange`
l2geth/internal/ethapi/api.go
View file @
1bcee8f1
...
@@ -53,6 +53,7 @@ import (
...
@@ -53,6 +53,7 @@ import (
var
(
var
(
errNoSequencerURL
=
errors
.
New
(
"sequencer transaction forwarding not configured"
)
errNoSequencerURL
=
errors
.
New
(
"sequencer transaction forwarding not configured"
)
errStillSyncing
=
errors
.
New
(
"sequencer still syncing, cannot accept transactions"
)
errStillSyncing
=
errors
.
New
(
"sequencer still syncing, cannot accept transactions"
)
errBlockNotIndexed
=
errors
.
New
(
"block in range not indexed, this should never happen"
)
)
)
const
(
const
(
...
@@ -780,9 +781,12 @@ func (s *PublicBlockChainAPI) GetBlockRange(ctx context.Context, startNumber rpc
...
@@ -780,9 +781,12 @@ func (s *PublicBlockChainAPI) GetBlockRange(ctx context.Context, startNumber rpc
// For each block in range, get block and append to array.
// For each block in range, get block and append to array.
for
number
:=
startNumber
;
number
<=
endNumber
;
number
++
{
for
number
:=
startNumber
;
number
<=
endNumber
;
number
++
{
block
,
err
:=
s
.
GetBlockByNumber
(
ctx
,
number
,
fullTx
)
block
,
err
:=
s
.
GetBlockByNumber
(
ctx
,
number
,
fullTx
)
if
block
==
nil
||
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
if
block
==
nil
{
return
nil
,
errBlockNotIndexed
}
blocks
=
append
(
blocks
,
block
)
blocks
=
append
(
blocks
,
block
)
}
}
return
blocks
,
nil
return
blocks
,
nil
...
...
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