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
a7538d00
Commit
a7538d00
authored
Mar 09, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge
parent
8560004f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
18 deletions
+15
-18
api.go
rpc/api.go
+13
-3
args.go
rpc/args.go
+2
-15
No files found.
rpc/api.go
View file @
a7538d00
...
...
@@ -665,10 +665,20 @@ func toFilterOptions(options *FilterOptions) core.FilterOptions {
opts
.
Earliest
=
options
.
Earliest
opts
.
Latest
=
options
.
Latest
opts
.
Topics
=
make
([][][]
byte
,
len
(
options
.
Topic
))
for
i
,
topic
:=
range
options
.
Topic
{
opts
.
Topics
[
i
]
=
fromHex
(
topic
)
topics
:=
make
([][][]
byte
,
len
(
options
.
Topics
))
for
i
,
topicDat
:=
range
options
.
Topics
{
if
slice
,
ok
:=
topicDat
.
([]
interface
{});
ok
{
topics
[
i
]
=
make
([][]
byte
,
len
(
slice
))
for
j
,
topic
:=
range
slice
{
topics
[
i
][
j
]
=
fromHex
(
topic
.
(
string
))
}
}
else
if
str
,
ok
:=
topicDat
.
(
string
);
ok
{
topics
[
i
]
=
make
([][]
byte
,
1
)
topics
[
i
][
0
]
=
fromHex
(
str
)
}
}
opts
.
Topics
=
topics
return
opts
}
rpc/args.go
View file @
a7538d00
...
...
@@ -333,7 +333,7 @@ type FilterOptions struct {
Earliest
int64
Latest
int64
Address
interface
{}
Topic
[]
interface
{}
Topic
s
[]
interface
{}
Skip
int
Max
int
}
...
...
@@ -360,20 +360,7 @@ func (args *FilterOptions) UnmarshalJSON(b []byte) (err error) {
args
.
Max
=
int
(
ethutil
.
Big
(
obj
[
0
]
.
Limit
)
.
Int64
())
args
.
Skip
=
int
(
ethutil
.
Big
(
obj
[
0
]
.
Offset
)
.
Int64
())
args
.
Address
=
obj
[
0
]
.
Address
topics
:=
make
([][][]
byte
,
len
(
obj
[
0
]
.
Topics
))
for
i
,
topicDat
:=
range
obj
[
0
]
.
Topics
{
if
slice
,
ok
:=
topicDat
.
([]
interface
{});
ok
{
topics
[
i
]
=
make
([][]
byte
,
len
(
slice
))
for
j
,
topic
:=
range
slice
{
topics
[
i
][
j
]
=
fromHex
(
topic
.
(
string
))
}
}
else
if
str
,
ok
:=
topicDat
.
(
string
);
ok
{
topics
[
i
]
=
make
([][]
byte
,
1
)
topics
[
i
][
0
]
=
fromHex
(
str
)
}
}
args
.
Topics
=
topics
args
.
Topics
=
obj
[
0
]
.
Topics
return
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