diff options
-rw-r--r-- | ethchain/state_transition.go | 12 | ||||
-rw-r--r-- | ethpipe/pipe.go | 6 | ||||
-rw-r--r-- | vm/.ethtest (renamed from ethvm/.ethtest) | 0 | ||||
-rw-r--r-- | vm/address.go (renamed from ethvm/address.go) | 2 | ||||
-rw-r--r-- | vm/asm.go (renamed from ethvm/asm.go) | 5 | ||||
-rw-r--r-- | vm/closure.go (renamed from ethvm/closure.go) | 2 | ||||
-rw-r--r-- | vm/common.go (renamed from ethvm/common.go) | 2 | ||||
-rw-r--r-- | vm/debugger.go (renamed from ethvm/debugger.go) | 2 | ||||
-rw-r--r-- | vm/environment.go (renamed from ethvm/environment.go) | 2 | ||||
-rw-r--r-- | vm/execution.go (renamed from ethvm/execution.go) | 2 | ||||
-rw-r--r-- | vm/stack.go (renamed from ethvm/stack.go) | 2 | ||||
-rw-r--r-- | vm/types.go (renamed from ethvm/types.go) | 2 | ||||
-rw-r--r-- | vm/virtual_machine.go (renamed from ethvm/virtual_machine.go) | 2 | ||||
-rw-r--r-- | vm/vm.go (renamed from ethvm/vm.go) | 2 | ||||
-rw-r--r-- | vm/vm_debug.go (renamed from ethvm/vm_debug.go) | 2 | ||||
-rw-r--r-- | vm/vm_test.go (renamed from ethvm/vm_test.go) | 2 |
16 files changed, 24 insertions, 23 deletions
diff --git a/ethchain/state_transition.go b/ethchain/state_transition.go index 5bb084ae4..79321eaac 100644 --- a/ethchain/state_transition.go +++ b/ethchain/state_transition.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/eth-go/ethstate" "github.com/ethereum/eth-go/ethtrie" "github.com/ethereum/eth-go/ethutil" - "github.com/ethereum/eth-go/ethvm" + "github.com/ethereum/eth-go/vm" ) /* @@ -160,13 +160,13 @@ func (self *StateTransition) TransitionState() (err error) { sender.Nonce += 1 // Transaction gas - if err = self.UseGas(ethvm.GasTx); err != nil { + if err = self.UseGas(vm.GasTx); err != nil { return } // Pay data gas dataPrice := big.NewInt(int64(len(self.data))) - dataPrice.Mul(dataPrice, ethvm.GasData) + dataPrice.Mul(dataPrice, vm.GasData) if err = self.UseGas(dataPrice); err != nil { return } @@ -261,11 +261,11 @@ func (self *StateTransition) Eval(msg *ethstate.Message, script []byte, context transactor = self.Sender() state = self.state env = NewEnv(state, self.tx, self.block) - callerClosure = ethvm.NewClosure(msg, transactor, context, script, self.gas, self.gasPrice) + callerClosure = vm.NewClosure(msg, transactor, context, script, self.gas, self.gasPrice) ) - //vm := ethvm.New(env, ethvm.Type(ethutil.Config.VmType)) - vm := ethvm.New(env, ethvm.DebugVmTy) + //vm := vm.New(env, vm.Type(ethutil.Config.VmType)) + vm := vm.New(env, vm.DebugVmTy) ret, _, err = callerClosure.Call(vm, self.tx.Data) diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index 39ee0ef07..5e5ff7000 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/eth-go/ethlog" "github.com/ethereum/eth-go/ethstate" "github.com/ethereum/eth-go/ethutil" - "github.com/ethereum/eth-go/ethvm" + "github.com/ethereum/eth-go/vm" ) var logger = ethlog.NewLogger("PIPE") @@ -58,9 +58,9 @@ func (self *Pipe) ExecuteObject(object *Object, data []byte, value, gas, price * self.Vm.State = self.World().State().Copy() - vm := ethvm.New(NewEnv(self.Vm.State, block, value.BigInt(), initiator.Address()), ethvm.Type(ethutil.Config.VmType)) + evm := vm.New(NewEnv(self.Vm.State, block, value.BigInt(), initiator.Address()), vm.Type(ethutil.Config.VmType)) - msg := ethvm.NewExecution(vm, object.Address(), data, gas.BigInt(), price.BigInt(), value.BigInt()) + msg := vm.NewExecution(evm, object.Address(), data, gas.BigInt(), price.BigInt(), value.BigInt()) ret, err := msg.Exec(object.Address(), initiator) fmt.Println("returned from call", ret, err) diff --git a/ethvm/.ethtest b/vm/.ethtest index e69de29bb..e69de29bb 100644 --- a/ethvm/.ethtest +++ b/vm/.ethtest diff --git a/ethvm/address.go b/vm/address.go index f987c4761..cfb7f36d9 100644 --- a/ethvm/address.go +++ b/vm/address.go @@ -1,4 +1,4 @@ -package ethvm +package vm import ( "math/big" diff --git a/ethvm/asm.go b/vm/asm.go index 7ff15a240..d081e2b09 100644 --- a/ethvm/asm.go +++ b/vm/asm.go @@ -1,9 +1,10 @@ -package ethvm +package vm import ( "fmt" - "github.com/ethereum/eth-go/ethutil" "math/big" + + "github.com/ethereum/eth-go/ethutil" ) func Disassemble(script []byte) (asm []string) { diff --git a/ethvm/closure.go b/vm/closure.go index 2d2204e5f..5a1e1d4d5 100644 --- a/ethvm/closure.go +++ b/vm/closure.go @@ -1,4 +1,4 @@ -package ethvm +package vm // TODO Re write VM to use values instead of big integers? diff --git a/ethvm/common.go b/vm/common.go index 617a8279f..6921b38ff 100644 --- a/ethvm/common.go +++ b/vm/common.go @@ -1,4 +1,4 @@ -package ethvm +package vm import ( "math/big" diff --git a/ethvm/debugger.go b/vm/debugger.go index 6144b5d6a..fdd5e34e2 100644 --- a/ethvm/debugger.go +++ b/vm/debugger.go @@ -1,4 +1,4 @@ -package ethvm +package vm import "github.com/ethereum/eth-go/ethstate" diff --git a/ethvm/environment.go b/vm/environment.go index b04fa332e..2d933b65c 100644 --- a/ethvm/environment.go +++ b/vm/environment.go @@ -1,4 +1,4 @@ -package ethvm +package vm import ( "math/big" diff --git a/ethvm/execution.go b/vm/execution.go index f5f1ce70d..6bed43026 100644 --- a/ethvm/execution.go +++ b/vm/execution.go @@ -1,4 +1,4 @@ -package ethvm +package vm import ( "fmt" diff --git a/ethvm/stack.go b/vm/stack.go index 4ac023fb9..55fdb6d15 100644 --- a/ethvm/stack.go +++ b/vm/stack.go @@ -1,4 +1,4 @@ -package ethvm +package vm import ( "fmt" diff --git a/ethvm/types.go b/vm/types.go index 6c433e3fd..5fd92052b 100644 --- a/ethvm/types.go +++ b/vm/types.go @@ -1,4 +1,4 @@ -package ethvm +package vm import ( "fmt" diff --git a/ethvm/virtual_machine.go b/vm/virtual_machine.go index dd2e568cf..cc8cd39a9 100644 --- a/ethvm/virtual_machine.go +++ b/vm/virtual_machine.go @@ -1,4 +1,4 @@ -package ethvm +package vm type VirtualMachine interface { Env() Environment @@ -1,4 +1,4 @@ -package ethvm +package vm import ( "fmt" diff --git a/ethvm/vm_debug.go b/vm/vm_debug.go index da9ad8d59..785e699c7 100644 --- a/ethvm/vm_debug.go +++ b/vm/vm_debug.go @@ -1,4 +1,4 @@ -package ethvm +package vm import ( "fmt" diff --git a/ethvm/vm_test.go b/vm/vm_test.go index 6b7cc2f5c..047b76121 100644 --- a/ethvm/vm_test.go +++ b/vm/vm_test.go @@ -1,4 +1,4 @@ -package ethvm +package vm import ( "bytes" |