diff options
author | obscuren <geffobscura@gmail.com> | 2014-08-05 17:30:12 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-08-05 17:30:12 +0800 |
commit | 3c78e418fbe70cfb574302f00962cf7fac50f69e (patch) | |
tree | 8a1218c4d59cf60d264a691ae125b00a8d3894ee | |
parent | e71b198e3d8df1bd8b73bae9bc934b778a3115bf (diff) | |
download | go-tangerine-3c78e418fbe70cfb574302f00962cf7fac50f69e.tar go-tangerine-3c78e418fbe70cfb574302f00962cf7fac50f69e.tar.gz go-tangerine-3c78e418fbe70cfb574302f00962cf7fac50f69e.tar.bz2 go-tangerine-3c78e418fbe70cfb574302f00962cf7fac50f69e.tar.lz go-tangerine-3c78e418fbe70cfb574302f00962cf7fac50f69e.tar.xz go-tangerine-3c78e418fbe70cfb574302f00962cf7fac50f69e.tar.zst go-tangerine-3c78e418fbe70cfb574302f00962cf7fac50f69e.zip |
world => World
-rw-r--r-- | ethpipe/pipe.go | 2 | ||||
-rw-r--r-- | ethpipe/world.go | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index c00731b84..a9da66ab8 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -21,7 +21,7 @@ type Pipe struct { obj ethchain.EthManager stateManager *ethchain.StateManager blockChain *ethchain.BlockChain - world *world + world *World Vm VmVars } diff --git a/ethpipe/world.go b/ethpipe/world.go index 2a07f340c..2c6b0b4b9 100644 --- a/ethpipe/world.go +++ b/ethpipe/world.go @@ -6,31 +6,31 @@ import ( "github.com/ethereum/eth-go/ethstate" ) -type world struct { +type World struct { pipe *Pipe cfg *config } -func NewWorld(pipe *Pipe) *world { - world := &world{pipe, nil} +func NewWorld(pipe *Pipe) *World { + world := &World{pipe, nil} world.cfg = &config{pipe} return world } -func (self *Pipe) World() *world { +func (self *Pipe) World() *World { return self.world } -func (self *world) State() *ethstate.State { +func (self *World) State() *ethstate.State { return self.pipe.stateManager.CurrentState() } -func (self *world) Get(addr []byte) *Object { +func (self *World) Get(addr []byte) *Object { return &Object{self.State().GetStateObject(addr)} } -func (self *world) safeGet(addr []byte) *ethstate.StateObject { +func (self *World) safeGet(addr []byte) *ethstate.StateObject { object := self.State().GetStateObject(addr) if object == nil { object = ethstate.NewStateObject(addr) @@ -39,22 +39,22 @@ func (self *world) safeGet(addr []byte) *ethstate.StateObject { return object } -func (self *world) Coinbase() *ethstate.StateObject { +func (self *World) Coinbase() *ethstate.StateObject { return nil } -func (self *world) IsMining() bool { +func (self *World) IsMining() bool { return self.pipe.obj.IsMining() } -func (self *world) IsListening() bool { +func (self *World) IsListening() bool { return self.pipe.obj.IsListening() } -func (self *world) Peers() *list.List { +func (self *World) Peers() *list.List { return self.pipe.obj.Peers() } -func (self *world) Config() *config { +func (self *World) Config() *config { return self.cfg } |