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
e71b198e
Commit
e71b198e
authored
Aug 05, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed object to Object
parent
4f0bda40
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
config.go
ethpipe/config.go
+2
-2
object.go
ethpipe/object.go
+4
-4
pipe.go
ethpipe/pipe.go
+2
-2
world.go
ethpipe/world.go
+2
-2
No files found.
ethpipe/config.go
View file @
e71b198e
...
...
@@ -8,7 +8,7 @@ type config struct {
pipe
*
Pipe
}
func
(
self
*
config
)
Get
(
name
string
)
*
o
bject
{
func
(
self
*
config
)
Get
(
name
string
)
*
O
bject
{
configCtrl
:=
self
.
pipe
.
World
()
.
safeGet
(
cnfCtr
)
var
addr
[]
byte
...
...
@@ -21,7 +21,7 @@ func (self *config) Get(name string) *object {
objectAddr
:=
configCtrl
.
GetStorage
(
ethutil
.
BigD
(
addr
))
return
&
o
bject
{
self
.
pipe
.
World
()
.
safeGet
(
objectAddr
.
Bytes
())}
return
&
O
bject
{
self
.
pipe
.
World
()
.
safeGet
(
objectAddr
.
Bytes
())}
}
func
(
self
*
config
)
Exist
()
bool
{
...
...
ethpipe/object.go
View file @
e71b198e
...
...
@@ -5,11 +5,11 @@ import (
"github.com/ethereum/eth-go/ethutil"
)
type
o
bject
struct
{
type
O
bject
struct
{
*
ethstate
.
StateObject
}
func
(
self
*
o
bject
)
StorageString
(
str
string
)
*
ethutil
.
Value
{
func
(
self
*
O
bject
)
StorageString
(
str
string
)
*
ethutil
.
Value
{
if
ethutil
.
IsHex
(
str
)
{
return
self
.
Storage
(
ethutil
.
Hex2Bytes
(
str
[
2
:
]))
}
else
{
...
...
@@ -17,10 +17,10 @@ func (self *object) StorageString(str string) *ethutil.Value {
}
}
func
(
self
*
o
bject
)
StorageValue
(
addr
*
ethutil
.
Value
)
*
ethutil
.
Value
{
func
(
self
*
O
bject
)
StorageValue
(
addr
*
ethutil
.
Value
)
*
ethutil
.
Value
{
return
self
.
Storage
(
addr
.
Bytes
())
}
func
(
self
*
o
bject
)
Storage
(
addr
[]
byte
)
*
ethutil
.
Value
{
func
(
self
*
O
bject
)
Storage
(
addr
[]
byte
)
*
ethutil
.
Value
{
return
self
.
StateObject
.
GetStorage
(
ethutil
.
BigD
(
addr
))
}
ethpipe/pipe.go
View file @
e71b198e
...
...
@@ -46,10 +46,10 @@ func (self *Pipe) Nonce(addr []byte) uint64 {
}
func
(
self
*
Pipe
)
Execute
(
addr
[]
byte
,
data
[]
byte
,
value
,
gas
,
price
*
ethutil
.
Value
)
([]
byte
,
error
)
{
return
self
.
ExecuteObject
(
&
o
bject
{
self
.
World
()
.
safeGet
(
addr
)},
data
,
value
,
gas
,
price
)
return
self
.
ExecuteObject
(
&
O
bject
{
self
.
World
()
.
safeGet
(
addr
)},
data
,
value
,
gas
,
price
)
}
func
(
self
*
Pipe
)
ExecuteObject
(
object
*
o
bject
,
data
[]
byte
,
value
,
gas
,
price
*
ethutil
.
Value
)
([]
byte
,
error
)
{
func
(
self
*
Pipe
)
ExecuteObject
(
object
*
O
bject
,
data
[]
byte
,
value
,
gas
,
price
*
ethutil
.
Value
)
([]
byte
,
error
)
{
var
(
initiator
=
ethstate
.
NewStateObject
([]
byte
{
0
})
block
=
self
.
blockChain
.
CurrentBlock
...
...
ethpipe/world.go
View file @
e71b198e
...
...
@@ -26,8 +26,8 @@ func (self *world) State() *ethstate.State {
return
self
.
pipe
.
stateManager
.
CurrentState
()
}
func
(
self
*
world
)
Get
(
addr
[]
byte
)
*
o
bject
{
return
&
o
bject
{
self
.
State
()
.
GetStateObject
(
addr
)}
func
(
self
*
world
)
Get
(
addr
[]
byte
)
*
O
bject
{
return
&
O
bject
{
self
.
State
()
.
GetStateObject
(
addr
)}
}
func
(
self
*
world
)
safeGet
(
addr
[]
byte
)
*
ethstate
.
StateObject
{
...
...
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