Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
张蕾
Geth-Modification
Commits
c4a1d4fe
Commit
c4a1d4fe
authored
Jul 31, 2018
by
gary rong
Committed by
Péter Szilágyi
Jul 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth/filters: fix the block range assignment for log filter (#17284)
parent
fb9f7261
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
api.go
eth/filters/api.go
+6
-8
No files found.
eth/filters/api.go
View file @
c4a1d4fe
...
@@ -330,15 +330,13 @@ func (api *PublicFilterAPI) GetLogs(ctx context.Context, crit FilterCriteria) ([
...
@@ -330,15 +330,13 @@ func (api *PublicFilterAPI) GetLogs(ctx context.Context, crit FilterCriteria) ([
filter
=
NewBlockFilter
(
api
.
backend
,
*
crit
.
BlockHash
,
crit
.
Addresses
,
crit
.
Topics
)
filter
=
NewBlockFilter
(
api
.
backend
,
*
crit
.
BlockHash
,
crit
.
Addresses
,
crit
.
Topics
)
}
else
{
}
else
{
// Convert the RPC block numbers into internal representations
// Convert the RPC block numbers into internal representations
var
(
begin
:=
rpc
.
LatestBlockNumber
.
Int64
()
begin
int64
if
crit
.
FromBlock
!=
nil
{
end
int64
begin
=
crit
.
FromBlock
.
Int64
()
)
if
crit
.
FromBlock
==
nil
{
begin
=
int64
(
rpc
.
LatestBlockNumber
)
}
}
if
crit
.
ToBlock
==
nil
{
end
:=
rpc
.
LatestBlockNumber
.
Int64
()
end
=
int64
(
rpc
.
LatestBlockNumber
)
if
crit
.
ToBlock
!=
nil
{
end
=
crit
.
ToBlock
.
Int64
()
}
}
// Construct the range filter
// Construct the range filter
filter
=
NewRangeFilter
(
api
.
backend
,
begin
,
end
,
crit
.
Addresses
,
crit
.
Topics
)
filter
=
NewRangeFilter
(
api
.
backend
,
begin
,
end
,
crit
.
Addresses
,
crit
.
Topics
)
...
...
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