aboutsummaryrefslogtreecommitdiffstats
path: root/xeth
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-10-31 21:43:14 +0800
committerobscuren <geffobscura@gmail.com>2014-10-31 21:43:14 +0800
commitaf8f5f0b69f1c359991d12c7708804fe8dd1f944 (patch)
treedd3d5bea8d57037a2d32fae86c4ba7fcc9161b16 /xeth
parent0ed1a8b50a9b9726cd57a2731d0405f6949c6188 (diff)
downloadgo-tangerine-af8f5f0b69f1c359991d12c7708804fe8dd1f944.tar
go-tangerine-af8f5f0b69f1c359991d12c7708804fe8dd1f944.tar.gz
go-tangerine-af8f5f0b69f1c359991d12c7708804fe8dd1f944.tar.bz2
go-tangerine-af8f5f0b69f1c359991d12c7708804fe8dd1f944.tar.lz
go-tangerine-af8f5f0b69f1c359991d12c7708804fe8dd1f944.tar.xz
go-tangerine-af8f5f0b69f1c359991d12c7708804fe8dd1f944.tar.zst
go-tangerine-af8f5f0b69f1c359991d12c7708804fe8dd1f944.zip
ethstate => state
Diffstat (limited to 'xeth')
-rw-r--r--xeth/hexface.go4
-rw-r--r--xeth/js_types.go6
-rw-r--r--xeth/object.go4
-rw-r--r--xeth/pipe.go6
-rw-r--r--xeth/vm_env.go28
-rw-r--r--xeth/world.go10
6 files changed, 29 insertions, 29 deletions
diff --git a/xeth/hexface.go b/xeth/hexface.go
index 829f530f4..5c8e7a3c7 100644
--- a/xeth/hexface.go
+++ b/xeth/hexface.go
@@ -7,8 +7,8 @@ import (
"github.com/ethereum/go-ethereum/chain"
"github.com/ethereum/go-ethereum/crypto"
- "github.com/ethereum/go-ethereum/ethstate"
"github.com/ethereum/go-ethereum/ethutil"
+ "github.com/ethereum/go-ethereum/state"
)
type JSXEth struct {
@@ -254,7 +254,7 @@ func (self *JSXEth) CompileMutan(code string) string {
return ethutil.Bytes2Hex(data)
}
-func ToJSMessages(messages ethstate.Messages) *ethutil.List {
+func ToJSMessages(messages state.Messages) *ethutil.List {
var msgs []JSMessage
for _, m := range messages {
msgs = append(msgs, NewJSMessage(m))
diff --git a/xeth/js_types.go b/xeth/js_types.go
index 058bfe0dd..9f8f12e7f 100644
--- a/xeth/js_types.go
+++ b/xeth/js_types.go
@@ -7,8 +7,8 @@ import (
"github.com/ethereum/go-ethereum/chain"
"github.com/ethereum/go-ethereum/crypto"
- "github.com/ethereum/go-ethereum/ethstate"
"github.com/ethereum/go-ethereum/ethutil"
+ "github.com/ethereum/go-ethereum/state"
)
// Block interface exposed to QML
@@ -90,7 +90,7 @@ type JSTransaction struct {
Confirmations int `json:"confirmations"`
}
-func NewJSTx(tx *chain.Transaction, state *ethstate.State) *JSTransaction {
+func NewJSTx(tx *chain.Transaction, state *state.State) *JSTransaction {
hash := ethutil.Bytes2Hex(tx.Hash())
receiver := ethutil.Bytes2Hex(tx.Recipient)
if receiver == "0000000000000000000000000000000000000000" {
@@ -212,7 +212,7 @@ type JSMessage struct {
Value string `json:"value"`
}
-func NewJSMessage(message *ethstate.Message) JSMessage {
+func NewJSMessage(message *state.Message) JSMessage {
return JSMessage{
To: ethutil.Bytes2Hex(message.To),
From: ethutil.Bytes2Hex(message.From),
diff --git a/xeth/object.go b/xeth/object.go
index fe4e84a4a..a4ac41e89 100644
--- a/xeth/object.go
+++ b/xeth/object.go
@@ -1,12 +1,12 @@
package xeth
import (
- "github.com/ethereum/go-ethereum/ethstate"
"github.com/ethereum/go-ethereum/ethutil"
+ "github.com/ethereum/go-ethereum/state"
)
type Object struct {
- *ethstate.StateObject
+ *state.StateObject
}
func (self *Object) StorageString(str string) *ethutil.Value {
diff --git a/xeth/pipe.go b/xeth/pipe.go
index f2759d660..25a69137d 100644
--- a/xeth/pipe.go
+++ b/xeth/pipe.go
@@ -10,16 +10,16 @@ import (
"github.com/ethereum/go-ethereum/chain"
"github.com/ethereum/go-ethereum/crypto"
- "github.com/ethereum/go-ethereum/ethstate"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/logger"
+ "github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/vm"
)
var pipelogger = logger.NewLogger("XETH")
type VmVars struct {
- State *ethstate.State
+ State *state.State
}
type XEth struct {
@@ -56,7 +56,7 @@ func (self *XEth) Execute(addr []byte, data []byte, value, gas, price *ethutil.V
func (self *XEth) ExecuteObject(object *Object, data []byte, value, gas, price *ethutil.Value) ([]byte, error) {
var (
- initiator = ethstate.NewStateObject(self.obj.KeyManager().KeyPair().Address())
+ initiator = state.NewStateObject(self.obj.KeyManager().KeyPair().Address())
block = self.blockChain.CurrentBlock
)
diff --git a/xeth/vm_env.go b/xeth/vm_env.go
index 952101f68..2c36444e9 100644
--- a/xeth/vm_env.go
+++ b/xeth/vm_env.go
@@ -4,18 +4,18 @@ import (
"math/big"
"github.com/ethereum/go-ethereum/chain"
- "github.com/ethereum/go-ethereum/ethstate"
+ "github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/vm"
)
type VMEnv struct {
- state *ethstate.State
+ state *state.State
block *chain.Block
value *big.Int
sender []byte
}
-func NewEnv(state *ethstate.State, block *chain.Block, value *big.Int, sender []byte) *VMEnv {
+func NewEnv(state *state.State, block *chain.Block, value *big.Int, sender []byte) *VMEnv {
return &VMEnv{
state: state,
block: block,
@@ -24,17 +24,17 @@ func NewEnv(state *ethstate.State, block *chain.Block, value *big.Int, sender []
}
}
-func (self *VMEnv) Origin() []byte { return self.sender }
-func (self *VMEnv) BlockNumber() *big.Int { return self.block.Number }
-func (self *VMEnv) PrevHash() []byte { return self.block.PrevHash }
-func (self *VMEnv) Coinbase() []byte { return self.block.Coinbase }
-func (self *VMEnv) Time() int64 { return self.block.Time }
-func (self *VMEnv) Difficulty() *big.Int { return self.block.Difficulty }
-func (self *VMEnv) BlockHash() []byte { return self.block.Hash() }
-func (self *VMEnv) Value() *big.Int { return self.value }
-func (self *VMEnv) State() *ethstate.State { return self.state }
-func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit }
-func (self *VMEnv) AddLog(ethstate.Log) {}
+func (self *VMEnv) Origin() []byte { return self.sender }
+func (self *VMEnv) BlockNumber() *big.Int { return self.block.Number }
+func (self *VMEnv) PrevHash() []byte { return self.block.PrevHash }
+func (self *VMEnv) Coinbase() []byte { return self.block.Coinbase }
+func (self *VMEnv) Time() int64 { return self.block.Time }
+func (self *VMEnv) Difficulty() *big.Int { return self.block.Difficulty }
+func (self *VMEnv) BlockHash() []byte { return self.block.Hash() }
+func (self *VMEnv) Value() *big.Int { return self.value }
+func (self *VMEnv) State() *state.State { return self.state }
+func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit }
+func (self *VMEnv) AddLog(state.Log) {}
func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error {
return vm.Transfer(from, to, amount)
}
diff --git a/xeth/world.go b/xeth/world.go
index daeb59e1c..dda2df274 100644
--- a/xeth/world.go
+++ b/xeth/world.go
@@ -3,7 +3,7 @@ package xeth
import (
"container/list"
- "github.com/ethereum/go-ethereum/ethstate"
+ "github.com/ethereum/go-ethereum/state"
)
type World struct {
@@ -22,7 +22,7 @@ func (self *XEth) World() *World {
return self.world
}
-func (self *World) State() *ethstate.State {
+func (self *World) State() *state.State {
return self.pipe.stateManager.CurrentState()
}
@@ -34,16 +34,16 @@ func (self *World) SafeGet(addr []byte) *Object {
return &Object{self.safeGet(addr)}
}
-func (self *World) safeGet(addr []byte) *ethstate.StateObject {
+func (self *World) safeGet(addr []byte) *state.StateObject {
object := self.State().GetStateObject(addr)
if object == nil {
- object = ethstate.NewStateObject(addr)
+ object = state.NewStateObject(addr)
}
return object
}
-func (self *World) Coinbase() *ethstate.StateObject {
+func (self *World) Coinbase() *state.StateObject {
return nil
}