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
612b6318
Commit
612b6318
authored
Aug 14, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Json types
parent
3fd03373
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
types.go
javascript/types.go
+13
-11
No files found.
javascript/types.go
View file @
612b6318
...
...
@@ -39,15 +39,16 @@ func (self *JSBlock) GetTransaction(hash string) otto.Value {
}
type
JSMessage
struct
{
To
,
From
string
Input
string
Output
string
Path
int
Origin
string
Timestamp
int32
Coinbase
string
Block
string
Number
int32
To
string
`json:"to"`
From
string
`json:"from"`
Input
string
`json:"input"`
Output
string
`json:"output"`
Path
int
`json:"path"`
Origin
string
`json:"origin"`
Timestamp
int32
`json:"timestamp"`
Coinbase
string
`json:"coinbase"`
Block
string
`json:"block"`
Number
int32
`json:"number"`
}
func
NewJSMessage
(
message
*
ethstate
.
Message
)
JSMessage
{
...
...
@@ -137,6 +138,7 @@ func (self *JSEthereum) Messages(object map[string]interface{}) otto.Value {
filter
.
SetEarliestBlock
(
earliest
)
}
}
if
object
[
"latest"
]
!=
nil
{
latest
:=
object
[
"latest"
]
if
l
,
ok
:=
latest
.
(
string
);
ok
{
...
...
@@ -146,10 +148,10 @@ func (self *JSEthereum) Messages(object map[string]interface{}) otto.Value {
}
}
if
object
[
"to"
]
!=
nil
{
filter
.
Set
To
(
ethutil
.
Hex2Bytes
(
object
[
"to"
]
.
(
string
)))
filter
.
Add
To
(
ethutil
.
Hex2Bytes
(
object
[
"to"
]
.
(
string
)))
}
if
object
[
"from"
]
!=
nil
{
filter
.
Set
From
(
ethutil
.
Hex2Bytes
(
object
[
"from"
]
.
(
string
)))
filter
.
Add
From
(
ethutil
.
Hex2Bytes
(
object
[
"from"
]
.
(
string
)))
}
if
object
[
"max"
]
!=
nil
{
filter
.
SetMax
(
object
[
"max"
]
.
(
int
))
...
...
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