diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-15 23:12:26 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-15 23:12:26 +0800 |
commit | 311c6f8a3fed5ac03ee4b442fd0f420072bc41b4 (patch) | |
tree | de823080f3704d7690fd7172c9742962b66baf3a /tests/helper/vm.go | |
parent | 266d21209478bdb8c89e1ffb95d7f0de34635968 (diff) | |
download | go-tangerine-311c6f8a3fed5ac03ee4b442fd0f420072bc41b4.tar.gz go-tangerine-311c6f8a3fed5ac03ee4b442fd0f420072bc41b4.tar.zst go-tangerine-311c6f8a3fed5ac03ee4b442fd0f420072bc41b4.zip |
Fixed remote Arithmetic tests
Diffstat (limited to 'tests/helper/vm.go')
-rw-r--r-- | tests/helper/vm.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/helper/vm.go b/tests/helper/vm.go index 49a0bfeae..44eb8fda1 100644 --- a/tests/helper/vm.go +++ b/tests/helper/vm.go @@ -1,7 +1,6 @@ package helper import ( - "fmt" "math/big" "github.com/ethereum/eth-go/ethstate" @@ -51,16 +50,13 @@ func (self *Env) BlockHash() []byte { return nil } // This is likely to fail if anything ever gets looked up in the state trie :-) func (self *Env) State() *ethstate.State { return ethstate.New(ethtrie.New(nil, "")) } -func RunVm(state *ethstate.State, env, exec map[string]string) ([]byte, *big.Int) { +func RunVm(state *ethstate.State, env, exec map[string]string) ([]byte, *big.Int, error) { caller := state.NewStateObject(ethutil.Hex2Bytes(exec["caller"])) callee := state.GetStateObject(ethutil.Hex2Bytes(exec["address"])) closure := ethvm.NewClosure(nil, caller, callee, callee.Code, ethutil.Big(exec["gas"]), ethutil.Big(exec["gasPrice"])) vm := ethvm.New(NewEnvFromMap(state, env, exec), ethvm.DebugVmTy) ret, _, e := closure.Call(vm, nil) - if e != nil { - fmt.Println(e) - } - return ret, closure.Gas + return ret, closure.Gas, e } |