diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/build/util.go | 13 | ||||
-rw-r--r-- | internal/ethapi/api.go | 6 | ||||
-rw-r--r-- | internal/ethapi/backend.go | 2 | ||||
-rw-r--r-- | internal/ethapi/tracer.go | 6 | ||||
-rw-r--r-- | internal/ethapi/tracer_test.go | 4 | ||||
-rw-r--r-- | internal/jsre/deps/bindata.go | 4 | ||||
-rw-r--r-- | internal/jsre/deps/deps.go | 3 |
7 files changed, 15 insertions, 23 deletions
diff --git a/internal/build/util.go b/internal/build/util.go index 1523a067b..4df7b9138 100644 --- a/internal/build/util.go +++ b/internal/build/util.go @@ -52,19 +52,10 @@ func MustRunCommand(cmd string, args ...string) { // GOPATH returns the value that the GOPATH environment // variable should be set to. func GOPATH() string { - path := filepath.SplitList(os.Getenv("GOPATH")) - if len(path) == 0 { + if os.Getenv("GOPATH") == "" { log.Fatal("GOPATH is not set") } - // Ensure that our internal vendor folder is on GOPATH - vendor, _ := filepath.Abs(filepath.Join("build", "_vendor")) - for _, dir := range path { - if dir == vendor { - return strings.Join(path, string(filepath.ListSeparator)) - } - } - newpath := append(path[:1], append([]string{vendor}, path[1:]...)...) - return strings.Join(newpath, string(filepath.ListSeparator)) + return os.Getenv("GOPATH") } // VERSION returns the content of the VERSION file. diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index c8374fe18..ccb7ec80b 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -18,6 +18,7 @@ package ethapi import ( "bytes" + "context" "encoding/hex" "errors" "fmt" @@ -43,7 +44,6 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/util" - "golang.org/x/net/context" ) const ( @@ -695,8 +695,8 @@ type ExecutionResult struct { type StructLogRes struct { Pc uint64 `json:"pc"` Op string `json:"op"` - Gas *big.Int `json:"gas"` - GasCost *big.Int `json:"gasCost"` + Gas uint64 `json:"gas"` + GasCost uint64 `json:"gasCost"` Depth int `json:"depth"` Error error `json:"error"` Stack []string `json:"stack"` diff --git a/internal/ethapi/backend.go b/internal/ethapi/backend.go index e10fb14ff..50cd3801b 100644 --- a/internal/ethapi/backend.go +++ b/internal/ethapi/backend.go @@ -18,6 +18,7 @@ package ethapi import ( + "context" "math/big" "github.com/ethereum/go-ethereum/accounts" @@ -30,7 +31,6 @@ import ( "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" - "golang.org/x/net/context" ) // Backend interface provides the common API services (that are provided by diff --git a/internal/ethapi/tracer.go b/internal/ethapi/tracer.go index ef107fc42..fe2685375 100644 --- a/internal/ethapi/tracer.go +++ b/internal/ethapi/tracer.go @@ -278,7 +278,7 @@ func wrapError(context string, err error) error { } // CaptureState implements the Tracer interface to trace a single step of VM execution -func (jst *JavascriptTracer) CaptureState(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost *big.Int, memory *vm.Memory, stack *vm.Stack, contract *vm.Contract, depth int, err error) error { +func (jst *JavascriptTracer) CaptureState(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost uint64, memory *vm.Memory, stack *vm.Stack, contract *vm.Contract, depth int, err error) error { if jst.err == nil { jst.memory.memory = memory jst.stack.stack = stack @@ -288,8 +288,8 @@ func (jst *JavascriptTracer) CaptureState(env *vm.EVM, pc uint64, op vm.OpCode, jst.log["pc"] = pc jst.log["op"] = ocw.toValue(jst.vm) - jst.log["gas"] = gas.Int64() - jst.log["gasPrice"] = cost.Int64() + jst.log["gas"] = gas + jst.log["gasPrice"] = cost jst.log["memory"] = jst.memvalue jst.log["stack"] = jst.stackvalue jst.log["depth"] = depth diff --git a/internal/ethapi/tracer_test.go b/internal/ethapi/tracer_test.go index 693afe802..0ef450ce3 100644 --- a/internal/ethapi/tracer_test.go +++ b/internal/ethapi/tracer_test.go @@ -136,10 +136,10 @@ func TestHaltBetweenSteps(t *testing.T) { env := vm.NewEVM(vm.Context{}, nil, params.TestChainConfig, vm.Config{Debug: true, Tracer: tracer}) contract := vm.NewContract(&account{}, &account{}, big.NewInt(0), 0) - tracer.CaptureState(env, 0, 0, big.NewInt(0), big.NewInt(0), nil, nil, contract, 0, nil) + tracer.CaptureState(env, 0, 0, 0, 0, nil, nil, contract, 0, nil) timeout := errors.New("stahp") tracer.Stop(timeout) - tracer.CaptureState(env, 0, 0, big.NewInt(0), big.NewInt(0), nil, nil, contract, 0, nil) + tracer.CaptureState(env, 0, 0, 0, 0, nil, nil, contract, 0, nil) if _, err := tracer.GetResult(); err.Error() != "stahp in server-side tracer function 'step'" { t.Errorf("Expected timeout error, got %v", err) diff --git a/internal/jsre/deps/bindata.go b/internal/jsre/deps/bindata.go index 5f6a2b873..782d4df80 100644 --- a/internal/jsre/deps/bindata.go +++ b/internal/jsre/deps/bindata.go @@ -84,7 +84,7 @@ func bignumberJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "bignumber.js", size: 17314, mode: os.FileMode(420), modTime: time.Unix(1484232218, 0)} + info := bindataFileInfo{name: "bignumber.js", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -104,7 +104,7 @@ func web3Js() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "web3.js", size: 491740, mode: os.FileMode(420), modTime: time.Unix(1484232456, 0)} + info := bindataFileInfo{name: "web3.js", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/internal/jsre/deps/deps.go b/internal/jsre/deps/deps.go index 8d0e1a400..fe2e6f2fa 100644 --- a/internal/jsre/deps/deps.go +++ b/internal/jsre/deps/deps.go @@ -17,4 +17,5 @@ // Package deps contains the console JavaScript dependencies Go embedded. package deps -//go:generate go-bindata -o bindata.go bignumber.js web3.js +//go:generate go-bindata -nometadata -pkg deps -o bindata.go bignumber.js web3.js +//go:generate gofmt -w -s bindata.go |