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
e38b0165
Commit
e38b0165
authored
Jun 29, 2014
by
zelig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed name for ethutil hex functions
parent
2d48fc11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
javascript_runtime.go
ethereum/javascript_runtime.go
+5
-5
No files found.
ethereum/javascript_runtime.go
View file @
e38b0165
...
...
@@ -122,12 +122,12 @@ out:
}
case
object
:=
<-
self
.
changeChan
:
if
stateObject
,
ok
:=
object
.
Resource
.
(
*
ethchain
.
StateObject
);
ok
{
for
_
,
cb
:=
range
self
.
objectCb
[
ethutil
.
Hex
(
stateObject
.
Address
())]
{
for
_
,
cb
:=
range
self
.
objectCb
[
ethutil
.
Bytes2
Hex
(
stateObject
.
Address
())]
{
val
,
_
:=
self
.
vm
.
ToValue
(
ethpub
.
NewPStateObject
(
stateObject
))
cb
.
Call
(
cb
,
val
)
}
}
else
if
storageObject
,
ok
:=
object
.
Resource
.
(
*
ethchain
.
StorageState
);
ok
{
for
_
,
cb
:=
range
self
.
objectCb
[
ethutil
.
Hex
(
storageObject
.
StateAddress
)
+
ethutil
.
Hex
(
storageObject
.
Address
)]
{
for
_
,
cb
:=
range
self
.
objectCb
[
ethutil
.
Bytes2Hex
(
storageObject
.
StateAddress
)
+
ethutil
.
Bytes2
Hex
(
storageObject
.
Address
)]
{
val
,
_
:=
self
.
vm
.
ToValue
(
ethpub
.
NewPStorageState
(
storageObject
))
cb
.
Call
(
cb
,
val
)
}
...
...
@@ -178,12 +178,12 @@ func (self *JSRE) watch(call otto.FunctionCall) otto.Value {
if
storageCallback
{
self
.
objectCb
[
addr
+
storageAddr
]
=
append
(
self
.
objectCb
[
addr
+
storageAddr
],
cb
)
event
:=
"storage:"
+
string
(
ethutil
.
FromHex
(
addr
))
+
":"
+
string
(
ethutil
.
FromHex
(
storageAddr
))
event
:=
"storage:"
+
string
(
ethutil
.
Hex2Bytes
(
addr
))
+
":"
+
string
(
ethutil
.
Hex2Bytes
(
storageAddr
))
self
.
ethereum
.
Reactor
()
.
Subscribe
(
event
,
self
.
changeChan
)
}
else
{
self
.
objectCb
[
addr
]
=
append
(
self
.
objectCb
[
addr
],
cb
)
event
:=
"object:"
+
string
(
ethutil
.
FromHex
(
addr
))
event
:=
"object:"
+
string
(
ethutil
.
Hex2Bytes
(
addr
))
self
.
ethereum
.
Reactor
()
.
Subscribe
(
event
,
self
.
changeChan
)
}
...
...
@@ -221,7 +221,7 @@ func (self *JSRE) execBlock(call otto.FunctionCall) otto.Value {
return
otto
.
UndefinedValue
()
}
err
=
utils
.
BlockDo
(
self
.
ethereum
,
ethutil
.
FromHex
(
hash
))
err
=
utils
.
BlockDo
(
self
.
ethereum
,
ethutil
.
Hex2Bytes
(
hash
))
if
err
!=
nil
{
fmt
.
Println
(
err
)
return
otto
.
FalseValue
()
...
...
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