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
2e39efbe
Commit
2e39efbe
authored
Jul 24, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New State object
parent
a06a84d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
javascript_runtime.go
ethereum/repl/javascript_runtime.go
+3
-2
No files found.
ethereum/repl/javascript_runtime.go
View file @
2e39efbe
...
...
@@ -6,6 +6,7 @@ import (
"github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethlog"
"github.com/ethereum/eth-go/ethpub"
"github.com/ethereum/eth-go/ethstate"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/go-ethereum/utils"
"github.com/obscuren/otto"
...
...
@@ -121,12 +122,12 @@ out:
if
_
,
ok
:=
block
.
Resource
.
(
*
ethchain
.
Block
);
ok
{
}
case
object
:=
<-
self
.
changeChan
:
if
stateObject
,
ok
:=
object
.
Resource
.
(
*
eth
chain
.
StateObject
);
ok
{
if
stateObject
,
ok
:=
object
.
Resource
.
(
*
eth
state
.
StateObject
);
ok
{
for
_
,
cb
:=
range
self
.
objectCb
[
ethutil
.
Bytes2Hex
(
stateObject
.
Address
())]
{
val
,
_
:=
self
.
vm
.
ToValue
(
ethpub
.
NewPStateObject
(
stateObject
))
cb
.
Call
(
cb
,
val
)
}
}
else
if
storageObject
,
ok
:=
object
.
Resource
.
(
*
eth
chain
.
StorageState
);
ok
{
}
else
if
storageObject
,
ok
:=
object
.
Resource
.
(
*
eth
state
.
StorageState
);
ok
{
for
_
,
cb
:=
range
self
.
objectCb
[
ethutil
.
Bytes2Hex
(
storageObject
.
StateAddress
)
+
ethutil
.
Bytes2Hex
(
storageObject
.
Address
)]
{
val
,
_
:=
self
.
vm
.
ToValue
(
ethpub
.
NewPStorageState
(
storageObject
))
cb
.
Call
(
cb
,
val
)
...
...
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