aboutsummaryrefslogtreecommitdiffstats
path: root/ethpipe
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-08-05 17:26:12 +0800
committerobscuren <geffobscura@gmail.com>2014-08-05 17:26:12 +0800
commite71b198e3d8df1bd8b73bae9bc934b778a3115bf (patch)
tree4ac7c72ce77df16bfa2dcb337f940d8918b70d39 /ethpipe
parent4f0bda403ea332eeb477f8e56457423628772b19 (diff)
downloadgo-tangerine-e71b198e3d8df1bd8b73bae9bc934b778a3115bf.tar
go-tangerine-e71b198e3d8df1bd8b73bae9bc934b778a3115bf.tar.gz
go-tangerine-e71b198e3d8df1bd8b73bae9bc934b778a3115bf.tar.bz2
go-tangerine-e71b198e3d8df1bd8b73bae9bc934b778a3115bf.tar.lz
go-tangerine-e71b198e3d8df1bd8b73bae9bc934b778a3115bf.tar.xz
go-tangerine-e71b198e3d8df1bd8b73bae9bc934b778a3115bf.tar.zst
go-tangerine-e71b198e3d8df1bd8b73bae9bc934b778a3115bf.zip
Renamed object to Object
Diffstat (limited to 'ethpipe')
-rw-r--r--ethpipe/config.go4
-rw-r--r--ethpipe/object.go8
-rw-r--r--ethpipe/pipe.go4
-rw-r--r--ethpipe/world.go4
4 files changed, 10 insertions, 10 deletions
diff --git a/ethpipe/config.go b/ethpipe/config.go
index 81d36d514..588fc8d97 100644
--- a/ethpipe/config.go
+++ b/ethpipe/config.go
@@ -8,7 +8,7 @@ type config struct {
pipe *Pipe
}
-func (self *config) Get(name string) *object {
+func (self *config) Get(name string) *Object {
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 &object{self.pipe.World().safeGet(objectAddr.Bytes())}
+ return &Object{self.pipe.World().safeGet(objectAddr.Bytes())}
}
func (self *config) Exist() bool {
diff --git a/ethpipe/object.go b/ethpipe/object.go
index ebfb5b904..f0032992c 100644
--- a/ethpipe/object.go
+++ b/ethpipe/object.go
@@ -5,11 +5,11 @@ import (
"github.com/ethereum/eth-go/ethutil"
)
-type object struct {
+type Object struct {
*ethstate.StateObject
}
-func (self *object) StorageString(str string) *ethutil.Value {
+func (self *Object) 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 *object) StorageValue(addr *ethutil.Value) *ethutil.Value {
+func (self *Object) StorageValue(addr *ethutil.Value) *ethutil.Value {
return self.Storage(addr.Bytes())
}
-func (self *object) Storage(addr []byte) *ethutil.Value {
+func (self *Object) Storage(addr []byte) *ethutil.Value {
return self.StateObject.GetStorage(ethutil.BigD(addr))
}
diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go
index 876a953aa..c00731b84 100644
--- a/ethpipe/pipe.go
+++ b/ethpipe/pipe.go
@@ -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(&object{self.World().safeGet(addr)}, data, value, gas, price)
+ return self.ExecuteObject(&Object{self.World().safeGet(addr)}, data, value, gas, price)
}
-func (self *Pipe) ExecuteObject(object *object, data []byte, value, gas, price *ethutil.Value) ([]byte, error) {
+func (self *Pipe) ExecuteObject(object *Object, data []byte, value, gas, price *ethutil.Value) ([]byte, error) {
var (
initiator = ethstate.NewStateObject([]byte{0})
block = self.blockChain.CurrentBlock
diff --git a/ethpipe/world.go b/ethpipe/world.go
index 25e2a1952..2a07f340c 100644
--- a/ethpipe/world.go
+++ b/ethpipe/world.go
@@ -26,8 +26,8 @@ func (self *world) State() *ethstate.State {
return self.pipe.stateManager.CurrentState()
}
-func (self *world) Get(addr []byte) *object {
- return &object{self.State().GetStateObject(addr)}
+func (self *world) Get(addr []byte) *Object {
+ return &Object{self.State().GetStateObject(addr)}
}
func (self *world) safeGet(addr []byte) *ethstate.StateObject {